Upgraded to Spring Data Build parent 1.1.1.RELEASE. Upgraded to Spring Data Commons 1.6.0.RC1. Switched to milestone repository. Adapted documentation references to RC1 of SPring Data Commons. Updated changelog, notice and readme.
Added section "entity persistence" to the reference documentation explaining the supported strategies for the detection of new-entities.
Original pull request: #32.
Introduced JpaParameters abstraction to support custom jpa-specific annotations on query parameters. Adjusted Parameter binders to use the JpaParameters abstraction. Added special handling for temporal JpaParameters to ParameterBinder.bind(…) and CriteriaQueryParameterBinder.bind(…).
Adapted changes introduced in DATACMNS-350. Original pull request: #31.
Added fix in QueryUtils to work around an EclipseLinks specialty to add strict joins on a call to root.get(…) even if a later root.join(…, JoinType.LEFT) should trump this.
We needed the first call to examine the metamodel of the path obtained to decide whether to join at all in next steps. We now work around this issue by doing a lot of ugly type checking and casting on the Metamodel directly.
We filed https://bugs.eclipse.org/bugs/show_bug.cgi?id=413892 to maybe let EclipseLink improve at that point.
Original pull request: #30.
Extended JpaMetamodelEntityInformation to deal with entities with custom composite keys for which we have to derive the identifier. Introduced IdentifierDerivingDirectFieldAccessFallbackBeanWrapper that is capable of deriving identifier values. Added test case to verify the support for save / load of entities with custom composite keys.
Original pull request: #28.
Adjusted createCountQueryFor(…) in QueryUtils to leave out the order by part in the generated query. This avoids problems with databases that require columns specified in the order by clause to be in the select / group by list for count queries (e.g. H2). In addition to that this should give us a little performance boost if the database did not already optimize the query execution.
Original pull request: #29.
JpaPersistentPropertyImpl is now considered persistent if it carries a @javax.persistence.Transient annotation. This should allow persistence providers to safely generate additional fields and not cause trouble in the mapping framework this way.
Introduced ExpressionBasedStringQuery to support the SpEL expression template rendering. This allows manually defined queries in either @Query or Spring Data named queries to use SpEL and reference the #entityName. Changed SimpleJpaQuery to use ExpressionBasedStringQuery by default. Added test case for repositories with SpEL expression based query methods.
Original pull request: #25.
Adjusted scanForMappingFileLocations(…) in ClasspathScanningPersistenceUnitPostProcessor to resolve the paths to class-path loadable paths. Updated test cases accordingly. Added test case and required resources to verify that mapping files with recursive wildcard pattern can be found from multiple locations in class path.
Original pull request: #24.
Remove the additional call to exists(…) in favor of a null check, we'd have to trigger anyway in the case of and exists success. This will avoid triggering an additional query.
The paginating ….findAll(…) of QueryDslJpaRepository now only executes the query if we really have items to fetch, i.e. if the page requested really exists.
We're now using AnnotationUtils.findAnnotation(…) in case of Hibernate to improve workaround for HHH-6951. Added id type caching as the annotation lookup is potentially expensive.
Added integration tests for Hibernate and EclipseLink.
JpaRepository now overrides CrudRepository.findAll(Iterable<ID> ids) to return a List instead of an utterable as SimpleJpaRepository returns a List anyway.
Count queries are now only validated if the query method is a paging one actually. Improved the exception text in case of a validation error to indicate which method caused it.
Upgraded to Spring Data Build 1.1.0. Upgraded to Spring Data Commons 1.6 M1. Added milestone repository. Updated documentation references to the 1.6 M1 artifacts.
SimpleJpaQuery now uses an explicitly created EntityManager instance to verify the manually defined query be able to close the instance explicitly. This will improve GCing the instance.
The variable put into the count(…) clause of the generated query is now the original value except we find a DTO project or a count projection in the first place.
Opened up the upper bound for Spring to be able to work with Spring 4. Expanded lower boundary of Slf4j dependency to 1.6.4 to let STS 3.x work with the JAR out of the box.
Removed the declaration of a global PersistenceExceptionTranslationPostProcessor as the factory already applies one at the bean level selectively. Added integration tests to make sure the translation gets applied and plain @Repository classes not affected at all.
We now shortcut the execution of SimpleJpaRepository.findAll(Iterable<Integer> ids) to return an empty collection in case no ids or null are given. Previously building a query with an IN clause failed with an empty parameter list given.
libs-snapshot filters repository declarations pointing into Artifactory again. This results in the plugin repository declaration in the Spring Data Build parent pom being stripped and the build to fail in case Bundlor is not already in the local repository.
PartTreeJpaQuery evaluates the newly introduced PartTree.isCountProjection() to rather trigger a derived count query instead of the actual query. Extended Query execution to potentially massage the returned value into the return type of the query method to allow long and int as return types for count queries.
If a JPA entity class has an @Version attribute we now consider this to determine whether it is new or not. So even if an id is set we'll consider it new as long as the version attribute is null.
This prevents the repository from being considered a repository a Spring bean instance has to be created for in case it is accidentally picked up during component scanning.
Upgraded to Spring Data Build 1.0.2.RELEASE along the way. Needed to upgrade to HSQLDB 2.2.9 as Hibernate 4 doesn't work with HSQLDB versions 1.x. Set up OpenJPA test run to still use HSQLD 1.8.0.10 as OpenJPA does not work with HSQLDB 2.x. *sigh*
Removed the explicit pointer to the XSD location of the context namespace as this apparently seems to cause duplicate imports of the tool namespace XSD.
This commit introduces support for JPQL inline like expressions such as "… like ?1%". The implementation will detect those expressions and turn the query back into a valid JPQL one. On query execution the parameters will be bound according to the like expression defined in the query.
Modified QueryUtils.toJpaOrder(…) to apply lower criteria if ignore case on Order is set to true and the property being sorted is of type String. Upgraded to Spring Data Commons 1.6.0.BUILD-SNAPSHOT along the way.