425 Commits

Author SHA1 Message Date
Oliver Gierke
2280ff027e DATACMNS-242 - Improved exception messages in QueryMethod. 2012-10-09 14:13:50 +02:00
Oliver Gierke
7c844df4d6 DATACMNS-233 - DomainClassConverter is now safe against null and empty Strings.
Added explicit check for null or empty String source before attempting conversion. Returning null for both cases.
2012-09-17 09:59:22 +02:00
Oliver Gierke
a83b8b7a48 DATACMNS-231 - Polished Sort domain class.
Improved/fixed JavaDoc. Made orders property final. Fixed formatting here and there. Deprecated Order.create(…) factory method as new Sort(…) can be used instead.
2012-09-13 20:03:15 +02:00
Oliver Gierke
442482b87e DATACMNS-229 - RepositoryInterfaceAwareBeanPostProcessor now uses bean class loader. 2012-09-13 20:02:54 +02:00
Oliver Gierke
1c5cc73b14 DATACMNS-220, DATAJPA-174 - Updated reference docs on query parsing.
Updated the repositories reference documentation section on query parsing to reflect the correct usage of method prefixes, how to use the Distinct, IgnoreCase and OrderBy clauses.
2012-09-04 11:07:27 +02:00
Oliver Gierke
f7b595439a DATACMNS-226 - Fixed bug in ConfigurableTypeInformationMapper caching.
Separated ConfigurableTypeInformationMapper from MappingContextTypeInformationMapper. The latter now lazily picks up the alias information if the cached values do not contain aliases.

Polished JavaDocs and clarified meaning of null values.
2012-09-03 13:38:21 +02:00
Spring Buildmaster
02f871ed81 DATACMNS-204 - Prepare next development iteration. 2012-07-23 09:19:34 -07:00
Spring Buildmaster
eb38b05d69 DATACMNS-204 - Release version 1.3.2.RELEASE. 2012-07-23 09:19:31 -07:00
Oliver Gierke
c05e084eba DATACMNS-204 - Prepare changelog for 1.3.2. 2012-07-23 18:14:36 +02:00
Oliver Gierke
8cef2dab16 DATACMNS-187 - Added getRevisionDate() to Revision.
Revision now exposes the revision date of the underlying metadata.
2012-07-16 10:59:36 +02:00
Oliver Gierke
75dd6a5fc3 DATACMNS-188 - Removed obsolete method from AbstractMappingContext. 2012-07-09 09:18:51 +02:00
Oliver Gierke
c8184419d9 DATACMNS-186 - Improved the way id properties are detected.
The id properties are now discovered by the BasicPersistentEntity during the call to addPersistentProperty(…). Beyond that the method rejects the id property if one was already set.
2012-06-22 14:25:36 +02:00
Oliver Gierke
6f70ca6489 DATACMNS-185 - Expose AbstractMappingContext initialization.
Added initialize() method to AbstractMpapingContext to ease manual initialization.
2012-06-22 14:06:28 +02:00
Spring Buildmaster
7300d68ad5 DATACMNS-184 - Prepare next development iteration. 2012-06-18 07:01:45 -07:00
Spring Buildmaster
8f08e78f01 DATACMNS-184 - Release version 1.3.1.RELEASE. 2012-06-18 07:01:38 -07:00
Oliver Gierke
4a536d85b4 DATACMNS-184 - Prepare changelog for 1.3.1.RELEASE. 2012-06-18 15:54:03 +02:00
Oliver Gierke
9c42393a51 DATACMNS-180 - Don't consider Java transient fields transient for persistence.
So far we have considered Java transient fields as transient through the isTransient() method on PersistentProperty. This resulted in the properties not being persisted eventually. We now consider all fields as non-transient by default as we actually have to persist them as the object cannot be re-created completely without doing so as the usage of the transient keyword might rely on the readObject(…) method inside the object which would actually reconstitute the transient field's state but we of course cannot call this method actually.
2012-06-06 12:34:05 +02:00
Oliver Gierke
b483cbc29a DATACMNS-179 - Defer adding initial entity set to AbstractMappingContext.
So far the domain classes to be added to the mapping context initially were added in afterPropertiesSet() of InitializingBean. This had the drawback that although the MappingContext is already set up properly the actual listeners of the events fired (e.g. index creating ones) might not have been set up properly. We list to the ContextRefreshedEvent indicating the entire ApplicationContext being set up completely. Thus all infrastructure components are set up properly and the timing issues doesn't exist anymore.
2012-06-04 12:27:03 +02:00
Oliver Gierke
f2bc78995e DATACMNS-178 - Fixed dependency scope for JUnit.
Reduced scope of junit-dep dependency from compile to test.
2012-05-29 12:28:23 +02:00
Oliver Gierke
271e08eced DATACMNS-177 - Changed OSGi bundle identifier to org.sfw.data.core. 2012-05-23 18:16:14 +02:00
Oliver Gierke
053bc8960e DATACMNS-175 - Execute Javadoc plugin before assembly. 2012-05-21 14:20:37 +02:00
Oliver Gierke
6c32b479d3 DATACMNS-174 - Part.Type now exposes keywords. 2012-05-21 14:20:29 +02:00
Oliver Gierke
23abe339b1 DATACMNS-173 - Upgraded Maven Compiler and Surefire plugins.
Upgraded Surefire plugin to 2.12. Upgraded JUnit dependency to 4.10. Upgraded compiler plugin to 2.4.
2012-05-21 14:20:19 +02:00
Oliver Gierke
c3c5cb7558 DATACMNS-172 - Improved handling of invalid PropertyPaths.
Introduced PropertyReferenceException to capture the invalid property and the base PropertyPath a property expression could be resolved into. Introduced getLeafProperty() to be able to access the leaf property of a property path being created.
2012-05-21 14:20:09 +02:00
Oliver Gierke
83c9a69ead DATACMNS-149 - Prepare 1.3.1 development. 2012-05-21 14:19:50 +02:00
Spring Buildmaster
9f48059bb5 DATACMNS-149 - Release version 1.3.0.RELEASE. 2012-05-16 10:15:47 -07:00
Oliver Gierke
ec87165c30 DATACMNS-149 - Updated changelog and pom.xml.
Fixed pom.xml to match requirements of Maven central.
2012-05-16 19:05:05 +02:00
Oliver Gierke
cee108d6e9 DATACMNS-149 - Polished repositories reference documentation. 2012-05-16 16:24:31 +02:00
Oliver Gierke
7673567a8c DATACMNS-171 - Added isQueryForEntity() method to QueryMethod.
isQueryForEntity() returns true if the QueryMethod returns either a single entity, a collection or Page of those.
2012-05-16 14:27:53 +02:00
Oliver Gierke
f4c3c786b7 Expose Bundlor's failOnWarnings to allow disabling for Sonar build. 2012-05-11 22:00:46 +02:00
Oliver Gierke
0f7231ec01 DATACMNS-170 - Fixed potential NullPointerException in ReflectionEntityInstantiator.
Moved null-check before the attempt to make the discovered id field accessible.
2012-05-07 12:53:54 +02:00
Oliver Gierke
b8c2e625b3 Polished pom.xml.
Removed obsolete stuff as we're now deploying to Artifactory.
2012-05-07 09:46:26 +02:00
Oliver Gierke
e20938a3ae DATAMONGO-439 - Performance improvements in mapping subsystem.
Fixed minor performance problems discovered by the fix for DATAMONGO-439. We're now caching the information whether a constructor parameter is an enclosing class parameter. PersistentEntityParameterValueProvider is throwing an exception now if the parameter is not referring to a property of the entity (via the parameter name).
2012-05-03 17:25:51 +02:00
Spring Buildmaster
f67f9eb4c9 Prepare 1.3.0.BUILD-SNAPSHOT development. 2012-05-02 12:01:50 -07:00
Spring Buildmaster
a1a60f39f4 [artifactory-release] Release version 1.3.0.BUILD 2012-05-02 12:01:48 -07:00
Oliver Gierke
100d5b3953 DATACMNS-165 - Updated changelog for 1.3.0.RC2 release. 2012-05-02 20:57:14 +02:00
Oliver Gierke
aec655a499 DATACMNS-167 - Improved Iterable handling in TypeDiscoverer.
If a type implemented Iterable<…> it was currently treated as a collection which might cause inappropriate conversion in the mapping sub-system. We now consider types collection like if they're either Iterable directly or assignable to Collection.
2012-05-02 20:55:30 +02:00
Oliver Gierke
5b0cb1a572 DATACMNS-166 - Improved API in Repositories / RepositoryFactoryInformation.
Renamed methods in RepositoryMetadata to be consistent with EntityMetadata. Changed return type of RepositoryMetadata.getIdType() to Class<? extends Serializable>. Changed RepositoryFactoryInformation interface to expose RepositoryInformation rather than just the repository interface. Added exposing the QueryMethod instances as well. Adapter Repositories wrapper and it's clients accordingly.
2012-05-02 19:49:11 +02:00
Oliver Gierke
7f6c03d36a DATACMNS-143 - Removed deprecations in MappingContextEvent. 2012-04-27 19:10:24 +02:00
Karl Bennett
a0bec0fce0 DATACMNS-159 - Improve reference documentation on repository extensions.
Updated section covering adding custom behavior to all repositories to better match what is in the actual code base.
2012-04-27 15:55:23 +02:00
Oliver Gierke
6a461c0a51 DATACMNS-161 - Upgrade to Querydsl 2.5.0.
Polished pom.xml a little.
2012-04-27 09:39:16 +02:00
Oliver Gierke
8448573c3e DATACMNS-158 - Test case failing to reproduce the ticket.
Added test case to show that invalid properties containing numeric digits do not cause a stack overflow.
2012-04-23 18:04:38 +02:00
Oliver Gierke
ddea8eda8f DATACMNS-157 - Query method lookup now only returns most specific method for overridden methods.
Supposed you have a base repository interface declaring a method:

interface BaseRepository<T, ID extends Serializable> extends Repository<T, ID> {

  T myGenericMethod();
}

as well as a concrete repository redeclaring this method to annotate a query on it:

interface ConcreteRepository extends BaseRepository<User, Long> {

  @Query("…")
  User myGenericMethod()
}

Until now we both returned the intermediate method as well as the concrete one which might cause failures as in this case a query derivation would be attempted for the intermediate method which will fail for obvious reasons. The fix now starts with looking up the most specific method when iterating over the repository's methods which causes the intermediate method to be skipped in case it was overridden.
2012-04-20 13:55:49 +02:00
Oliver Gierke
06dc1e5dba DATACMNS-156 - Removed deprecated persistence package. 2012-04-20 13:20:14 +02:00
Oliver Gierke
ecf3592d1f DATACMNS-153 - Fixed class loading issue in SimpleEntityPathResolver.
The path class is loaded using the domain class' class loader instead of the one of SimpleEntityPathResolver.
2012-04-20 13:01:10 +02:00
Oliver Gierke
f1516a96aa DATACMNS-154 - Fixed query method detection when re-declararing CrudRepositoryMethods.
With the fix for DATACMNS-151 we apparently broke the generic parameter type matching for methods that carry the domain class type parameter as argument. We now inspect the bound and make sure we compare the name of it if it's a TypeVariable or use the plain parameter type if its not.
2012-04-19 12:45:33 +02:00
Spring Buildmaster
91eef0e8a5 DATACMNS-148 - Next development version. 2012-04-16 11:55:00 +02:00
Spring Buildmaster
703b285962 Release version 1.3.0.RC1. 2012-04-16 11:54:50 +02:00
Oliver Gierke
5fe65bb28d DATACMNS-148 - Prepare 1.3.0.RC1 release.
Adapted changelog.
2012-04-16 09:23:40 +02:00
Oliver Gierke
3196f3b0f5 DATAJPA-153 - Fixed typo in reference documentation. 2012-04-15 19:43:47 +02:00