Commit Graph

131 Commits

Author SHA1 Message Date
Oliver Gierke
fcb4992983 DATAJPA-90 - Refactored PartTreeJpaQuery to create new JpaQueryCreator on every query recreation.
Fixed potential concurrency problem for PartTree based query creation. JpaQueryCreator is stateful as we create a list of ParameterExpressions and iterate over them. So we have to re-instantiate the JpaQueryCreator to not create an exception on the second attempt. We now eagerly create CriteriaQuery and it's ParameterExpressions in QueryPreparer's constructor. Lazily doing so could let to exceptions accessing the ParameterExpressions in race conditions.
2011-09-02 18:23:54 +02:00
Phil Webb
23002ac505 DATAJPA-88 - Minor improvements to documentation. 2011-09-02 18:23:54 +02:00
Oliver Gierke
bc4ff86928 DATAJPA-79 - Reverted version of javax.annotation to 0.0.0 in template.mf. 2011-09-02 18:23:44 +02:00
Oliver Gierke
29bffe06e1 Fixed distribution name. 2011-09-02 16:54:54 +02:00
Oliver Gierke
e622aba687 Prepare 1.0.x development. 2011-09-02 16:54:46 +02:00
Oliver Gierke
c2e3984545 Prepare 1.0.0.RELEASE. 2011-07-21 20:28:41 +02:00
Oliver Gierke
00ece2c25e Polished codebase and added architecture management.
Added Sonargraph architecture description. Removed cyclic package dependency. Introduced JpaEntityInformationSupport to contain common getEntityName() method and serving as factory for JpaEntityInformation instances.
2011-07-21 12:20:18 +02:00
Oliver Gierke
14e8bd6955 Added package-info.java for support package. 2011-07-21 10:28:14 +02:00
Oliver Gierke
1f4dc248e4 Polished whitespace in readme.md. 2011-07-21 10:23:16 +02:00
Oliver Gierke
306a5ca1b8 Enable syntax highlighting in readme.md. 2011-07-21 10:21:50 +02:00
Oliver Gierke
fe50153747 Polished readme.md. 2011-07-21 10:16:41 +02:00
Oliver Gierke
7eed88de16 Updated changelog for 1.0 release. 2011-07-21 10:06:57 +02:00
Oliver Gierke
5d48968216 Polished pom.xml.
Updated source plugin to 2.1.2 and javadoc plugin 2.8. Added link to Spring Data Commons Javadocs. Fixed configuration of source plugin.
2011-07-21 09:56:30 +02:00
Oliver Gierke
a49bb4c8e4 Upgraded to Spring Data Commons 1.1.0.RC1. 2011-07-19 17:53:40 +02:00
Oliver Gierke
d0b7901ce8 DATAJPA-78 - Upgrade to Querydsl 2.2.0.
Upgraded to Querydsl 2.2.0. Added configuration to generate query classes for AbstractPersistable and AbstractAuditable. Package those query classes into the source JAR and compile it into the binary as well. Upgraded Mysema APT plugin to 1.0.2.
2011-07-19 17:25:47 +02:00
Oliver Gierke
537ac8c23c DATAJPA-77 - Count queries for manually defined queries don't get pagination applied anymore. 2011-07-19 09:22:02 +02:00
Oliver Gierke
c164ac3f20 DATAJPA-71 - CriteriaQueries created from derived queries are cached now if possible.
We now create the CriteriaQuery instance for derived queries only once in case the query method does not contain a dynamic sort parameter (either through a plain Sort or via a Pageable).
2011-07-19 09:04:39 +02:00
Oliver Gierke
05e91c3af0 DATAJPA-72 - Fixed template.mf to add correct version for Spring Data Commons packages. 2011-07-07 14:00:09 +02:00
Oliver Gierke
829ddfce01 DATACMNS-49 - Fixed query syntax in test named query file. 2011-06-23 20:18:53 +02:00
Oliver Gierke
5d3602d53f DATACMNS-49 - Added integration for Spring Data named queries.
We now support extracting query definitions into a properties file which can be configured on the JpaRepositoryFactoryBean. The namespace will look for classpath*:META-INF/jpa-named-queries.properties by default.
2011-06-23 19:47:59 +02:00
Oliver Gierke
dae766d579 Upgrade to Spring Data Commons 1.1.0.BUILD-SNAPSHOT. 2011-06-23 19:46:37 +02:00
Oliver Gierke
3f968c861f Prepare next development iteration. 2011-06-23 10:31:57 +02:00
Oliver Gierke
1d79c1bfeb Prepare 1.0.0.RC1 release.
Updated changelog and Spring Data Commons version to 1.1.0.M2.
2011-06-23 10:21:39 +02:00
Oliver Gierke
405fccb04f DATAJPA-64 - Refactored query execution to use ParameterExpression.
The JpaQueryCreator now creates a CriteriaQuery using ParameterExpressions that have to be bound later on. Refactored the RepositoryQuery implementation hierarchy and JpaQueryExecution as binding has to be done by the query classes now. This required the introduction of a special CriteraQueryParameterBinder as well. It uses the ParameterExpressions of the CriteriaQuery to bind the actual query values later on.

We have to convert arrays passed into query method into collections as none of the major persistence providers support binding arrays to IN parameters currently.
2011-06-21 20:49:54 +02:00
Oliver Gierke
762e57ca2f DATAJPA-31 - Changed default of @Modifying(clearAutomatically) to false. 2011-06-19 18:47:29 +02:00
Oliver Gierke
49dad31cbb Made Querydsl dependency optional. 2011-06-17 07:00:29 +02:00
Oliver Gierke
5d38542a38 Updated Hibernate to 3.6.5 and OpenJpa to 2.1.0. 2011-06-15 19:44:31 +02:00
Oliver Gierke
53c3cf9230 DATAJPA-38 - Introduced MergingPersistenceUnitManager. 2011-06-13 20:28:50 -07:00
Oliver Gierke
bafe2ee64e Reduced log level for testing. 2011-06-13 20:28:23 -07:00
Oliver Gierke
ea0ff71499 Adapted package refactorings in Spring Data Commons.
Resolved package dependencies as well.
2011-06-13 20:28:23 -07:00
Oliver Gierke
868f3ec5a6 Polished documentation creation. 2011-06-13 17:29:09 -07:00
Oliver Gierke
9023b2e3da DATAJPA-43 - Updated documentation to reflect correct use of JpaSpecificationExecuter. 2011-06-13 17:28:54 -07:00
Oliver Gierke
12706a6c5b DATAJPA-56 - Cover In and NotIn query keywords in reference documentation. 2011-06-13 16:41:14 -07:00
Oliver Gierke
b8ad5e8b81 DATAJPA-68 - Refactored AuditingEntityListener.
Separated touch(…) methods for updating and creation as some persistence providers might hand in entities with IDs already assigned into a @PrePersist method and thus the isNew() check will fail.
2011-06-13 16:24:10 -07:00
Oliver Gierke
b295dd302d DATAJPA-62 - Made Querydsl optional OSGi dependency. 2011-05-24 17:36:30 +02:00
Oliver Gierke
356ce6330c Moved QueryDslPredicateExecutor into Spring Data Commons. 2011-05-23 12:23:52 +02:00
Oliver Gierke
75281a99d4 DATACMNS-29 - Adapted changes in Spring Data Commons. 2011-05-12 14:01:56 +02:00
Oliver Gierke
159ea28f88 DATACMNS-36 - Revert to using @Transactional at repository implementation again. 2011-05-12 13:59:53 +02:00
Oliver Gierke
ad40b37f40 DATACMNS-35 - Added implementation and test for newly introduced Repository.delete(ID id) method. 2011-05-11 18:39:27 +02:00
Oliver Gierke
30bb367e96 DATAJPA-59, DATAJPA-60 - Improved handling of PersistenceProviders not capable of extracting queries for paging query methods.
Removed check for that capability (QueryExtractor.canExtractQuery()) from JpaQueryMethod and defer it into NamedQuery as we can handle derived queries and queries annotated with @Query regardless of that capability.

Made exception message a bit more verbose to give hints what to do if the exception occurs.
2011-05-11 13:33:35 +02:00
Oliver Gierke
9add191da5 Updated changelog. 2011-05-10 12:48:12 +02:00
Oliver Gierke
536f8ccd91 DATAJPA-58 - JpaPersistableEntityInformation now uses Persistable.isNew(…).
Added unit tests to verify behavior and updated changelog accordingly.
2011-05-10 12:20:29 +02:00
Oliver Gierke
1cfa3acb22 Updated changelog. 2011-04-28 08:09:17 +02:00
Oliver Gierke
e81d480021 Prefer method.getAnnotation(…) over AnnotationUtils.findAnnotation(…).
The latter method is much much slower than the former and JpaQueryMethod.isModifyingQuery() is invoked for every query method execution.
2011-04-28 07:53:33 +02:00
Oliver Gierke
33a3c8f5ae DATACMNS-33 - Adapted API changes for Repository.count().
Also changed return types for count() methods on JpaSpecificationExecutore and QueryDslPredicateExecutor.
2011-04-21 10:02:10 +02:00
Oliver Gierke
97859f5dee DATACMNS-32 - Removed Querydsl support classes and use the ones from Spring Data Commons Core. 2011-04-20 20:32:21 +02:00
Oliver Gierke
21492c061a Use latest Spring Data Commons Core snapshots. 2011-04-20 20:31:42 +02:00
Oliver Gierke
c4a71140c9 DATAJPA-48 - Added findAll(Specification, Sort) to JpaSpecificationExecutor.
Added implementation to SimpleJpaRepository.
2011-04-11 15:15:51 +02:00
Oliver Gierke
6ab4599bd5 Added convenience constructor in SimpleJpaRepository. 2011-04-11 15:04:36 +02:00
Oliver Gierke
c2b7047c71 DATAJPA-44 - Adapted changes in Spring Data Commons Core.
Added unit tests to ensure correct named query name.
2011-04-05 11:17:05 +02:00