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.
Static factory methods on Specifications are now more lenient regarding null values eventually evaluating to null predicates on concatenation attempts.
We now build a correct count query for entities that use a compound key mapped using @IdClass. Added integration tests for EclipseLink and OpenJPA to run the basic tests of SimpleJpaRepository against different persistence providers. Ignored failing test against OpenJPA.
In case the AuditingEntityListener is declared globally and <jpa:auditing /> is not activated the listener is considered by the JPA infrastructure but not configured correctly. In particular no AuditingHandler gets injected which leads to NullPointerExceptions every time an entity is persisted. Added checks for null to the access and skip it if no AuditingHandler is present.
Added integration tests in org.springframework.data.jpa.infrastructure that will not be included in the normal test execution as they are purely means to quickly identify potential differences in persistence provider implementations.
When applying sorting options to a Specification based query we have to make sure to apply left joins where necessary as we otherwise exclude results with null associations. Applying the sort options does an enhanced inspection of the target path and declares a left join instead of a get if the path logically points to an entity. The Metamodel API is not without caveats here, see http://bit.ly/10geC02.
Upgraded to use new methods introduced for DATACMNS-269 to be able to detect mapping annotations independently of whether they are declared on the field or an accessor method for the property. Upgraded to new artifactId Spring Data Commons is distributed under.