Commit Graph

327 Commits

Author SHA1 Message Date
Oliver Gierke
d655862251 DATAJPA-342 - Corrected generated count projection from string queries.
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.
2013-05-07 14:01:25 +02:00
Oliver Gierke
31006e1866 DATAJPA-341 - Fixed regression introduced in advanced LIKE binding.
We now don't throw an exception anymore in case a normal LIKE binding is used in manually defined queries.
2013-05-04 11:46:18 +02:00
Oliver Gierke
617423797d DATAJPA-340 - Updated template.mf to generate and improved OSGi manifest.
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.
2013-05-03 13:48:39 +02:00
Cristian Sandiga
e2c60ec6f0 DATAJPA-334 - Fixed referenced JUnit runner in readme.md.
SpringJUnit4TestRunner -> SpringJunit4ClassRunner.
2013-04-29 14:53:22 +02:00
Oliver Gierke
fc4f0c3410 DATAJPA-323 - Added integration tests for JavaConfig and Repositories. 2013-04-26 10:27:33 +02:00
Oliver Gierke
f697b2e102 DATAJPA-296 - Fixed ignore case handling for Querydsl integration.
When using QuerydslPredicateExecutor the ignore case flag defined on the given Order inside a Pageable is considered correctly.
2013-04-25 10:54:26 +02:00
Oliver Gierke
ace028fa2b DATAJPA-330 - Improve setup of persistence exception translation.
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.
2013-04-24 11:07:58 +02:00
Oliver Gierke
edddb6dfb5 DATAJPA-332 - Optimization for SimpleJpaRepository.findAll(…) taking Iterable.
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.
2013-04-19 10:51:04 +02:00
Oliver Gierke
4b1cd49079 DATAJPA-331 - Use correct snapshot repository to resolve plugin dependencies. 2013-04-19 10:36:57 +02:00
Oliver Gierke
391a77d058 DATAJPA-331 - Use lib-snapshot repository instead of libs-snapshot.
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.
2013-04-18 12:02:39 +02:00
Oliver Gierke
4c65ad1df6 DATAJPA-296 - Fixed application of ignore case flag on string queries.
The ignore-case flag held in a Sort.Order is now also applied when manually defining queries.
2013-04-18 11:20:14 +02:00
Oliver Gierke
0bf2cb391e DATAJPA-231 - Added support for derived countBy queries.
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.
2013-03-26 15:21:26 +01:00
Oliver Gierke
d364b441b4 DATAJPA-319 - Use default CDI repository scope (application).
Don't inherit the scope of the repository from the EntityManager but let it be the default (application scope singleton).
2013-03-25 17:53:52 +01:00
Oliver Gierke
40caa97808 DATAJPA-321, DATAJPA-320 - Upgraded to Querydsl 3.0.0.
Upgraded to Spring Data Build 1.1.0.BUILD-SNAPSHOT to benefit from Querydsl dependency upgrade. Upgraded Maven APT plugin to 1.0.8 alongside.
2013-03-25 17:53:52 +01:00
Oliver Gierke
f6863e6972 DATAJPA-119 - JpaMetamodelEntityInformation now considers @Version.
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.
2013-03-25 17:53:52 +01:00
Oliver Gierke
9dcf919207 DATAJPA-303 - Added integration test to show auditing on update working. 2013-03-25 17:53:52 +01:00
Oliver Gierke
08831c1f60 DATAJPA-317 - Added @NoRepositoryBean to JpaRepsitory interface.
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.
2013-03-25 17:53:30 +01:00
Oliver Gierke
d0a383a2d9 DATAJPA-316 - Added build profiles to build against Hibernate 4.1 and 4.2.
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*
2013-03-19 14:41:39 +01:00
Oliver Gierke
3d3fbbc0e8 DATAJPA-314 - Improve namespace XSDs to avoid IDE warnings.
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.
2013-03-18 19:14:06 +01:00
Oliver Gierke
285a994e95 DATAJPA-292 - Manually defined queries can contain like expressions now.
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.
2013-03-13 17:16:53 +01:00
Oliver Gierke
c2aa1215f8 DATAJPA-308 - Improved test case to satisfy Java 6 compiler.
Added explicit type hints to matchers as the code won't compile under JDK 6 otherwise.
2013-03-08 11:54:03 +01:00
Oliver Gierke
bc0bf33b55 Fixed indentation to tabs in pom.xml. 2013-03-07 13:15:31 +01:00
Oliver Gierke
8dec595a19 DATAJPA-308 - Improve registration of PersistenceAnnotationBeanPostProcessor. 2013-03-07 12:59:06 +01:00
Kevin Raymond
60923c8651 DATAJPA-296 - Added support for case insensitive sorting.
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.
2013-02-27 18:47:43 +01:00
Oliver Gierke
22e6ceee53 DATAJPA-300 - Specifications are now more lenient against null values.
Static factory methods on Specifications are now more lenient regarding null values eventually evaluating to null predicates on concatenation attempts.
2013-02-25 16:06:01 +01:00
Spring Buildmaster
3005108c2a DATAJPA-295 - Prepare next development iteration. 2013-02-07 07:51:03 -08:00
Spring Buildmaster
b01b83769a DATAJPA-295 - Release version 1.3.0.RELEASE. 2013-02-07 07:51:00 -08:00
Oliver Gierke
b68288605e DATAJPA-295 - Upgraded to Spring Data Commons 1.5.0.RELEASE.
Upgraded to Spring Data build parent 1.0.0.RELEASE.
2013-02-07 16:06:47 +01:00
Oliver Gierke
6a23f14db9 DATAJPA-295 - Updated changelog for 1.3.0.RELEASE. 2013-02-07 15:45:43 +01:00
Oliver Gierke
0efbb12e2b DATAJPA-291 - Polished Specification documentation.
Explained usage of JPA metamodel. Fixed errors in sample code (method visibility and generics).
2013-02-06 18:36:37 +01:00
Oliver Gierke
dfec00d5ed DATAJPA-293 - Upgraded to JodaTime 2.1.
…by using the property defined in the parent pom.xml.
2013-02-06 18:35:54 +01:00
Oliver Gierke
16f6170019 DATAJPA-285 - Removed obsolete resources after upgrade to new build.
Simplified structure of Docbook documentation source files. Updated copyright range to include 2013.
2013-01-31 13:12:31 +01:00
Oliver Gierke
7cba94261e DATACMNS-277 - Include general auditing documentation from Spring Data Commons. 2013-01-30 15:09:57 +01:00
Oliver Gierke
982f6549c0 DATAJPA-285 - Added wagon plugin to enable artifact distribution. 2013-01-29 19:54:37 +01:00
Thomas Darimont
562dc19b8c DATAJPA-266 - Fixed SimpleJpaRepository.exists(…) for composite ids.
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.
2013-01-28 10:58:33 +01:00
Oliver Gierke
943be87908 DATAJPA-288 - Separate test execution for different persistence providers.
Re-enabled more integration tests integration tests.
2013-01-25 18:51:20 +01:00
Oliver Gierke
a74fadd234 DATAJPA-287 - Count query execution now considers distinct flag of query.
If the implementation of a Specification sets the distinct flag, we now create a count query that is honoring the distinct flag as well.
2013-01-25 18:50:45 +01:00
Oliver Gierke
d597d3f797 DATAJPA-286 - Removed plugin configuration redundancy.
Cleaned up duplicate Surefire configuration from pom.xml.
2013-01-22 17:51:41 +01:00
Oliver Gierke
bb743e34cf DATAJPA-285 - Refer to deployment repository to get unfiltered pom.xml. 2013-01-18 14:44:53 +01:00
Ranie Jade Ramiso
6b95150762 DATAJPA-280 - Added null guards to AuditingHandler access.
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.
2013-01-17 16:54:11 +01:00
Oliver Gierke
28a565faec DATAJPA-286 - Added test infrastructure for plain JPA tests.
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.
2013-01-17 16:08:00 +01:00
Oliver Gierke
bc6e2a7bc9 DATAJPA-277 - Specification execution with sorting now uses left joins where necessary.
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.
2013-01-17 15:34:10 +01:00
Oliver Gierke
b380ed6bd0 DATAJPA-285 - Upgraded pom.xml to use new build infrastructure. 2013-01-17 11:44:28 +01:00
Oliver Gierke
02239859bb DATAJPA-284 - Added @OneToOne as annotation to be considered an association. 2013-01-16 17:48:56 +01:00
Oliver Gierke
a7e5784406 DATAJPA-283 - Support accessor method level mapping annotations.
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.
2013-01-16 17:48:16 +01:00
Oliver Gierke
1b0e87bc18 DATAJPA-282 - Polished JavaDoc. 2013-01-15 22:21:57 +01:00
Oliver Gierke
325082d061 DATACMNS-263 - Upgraded to OpenWebbeans 1.1.7 for testing. 2013-01-05 19:36:56 +01:00
Oliver Gierke
258af43397 DATAJPA-274 - Introduce JPA Metamodel based MappingContext implementation.
Implemented rudimentary MappingContext to expose a JpaPersistentEntity through RepositoryFactoryInformation.
2012-11-28 18:15:49 +01:00
Oliver Gierke
69bcc3d887 DATAJPA-272 - Polished logging setup to reduce noise in test cases. 2012-11-27 16:14:53 +01:00
Oliver Gierke
fc818b7087 DATAJPA-116 - Improved implementation to support annotation-based auditing.
Re-engineered our auditing setup to leverage the APIs introduced from DATACMNS-137.
2012-11-27 15:26:22 +01:00