Commit Graph

353 Commits

Author SHA1 Message Date
Oliver Gierke
7a3b20992d DATACMNS-84 - Adapt refactorings. 2011-10-07 12:18:48 +02:00
Oliver Gierke
63e564aee3 DATACMNS-82 - Adapted changes in Spring Data Commons. 2011-09-30 12:12:32 +02:00
Igor Mihalik
046e2bd71d DATAJPA-109 - Upgrade to spring version 3.0.6.RELEASE. 2011-09-28 18:12:40 +02:00
Oliver Gierke
a5cb8ee6c0 DATAJPA-54 - Added forCounting() flag to @QueryHints.
The flag defaults to true and allows disabling of QueryHints being applied to the count query additionally triggered for pagination.
2011-09-06 13:47:38 +02:00
Oliver Gierke
6fec65b504 DATAJPA-97 - Added test to verify hints get applied to all queries correctly.
The actual fix for this ticket has been introduced during the refactoring for DATAJPA-86 (04349d25dc) thus it's already fixed in 1.1.0.M1. Added a test case to verify the behavior.
2011-09-06 13:19:59 +02:00
Oliver Gierke
86d0006155 DATAJPA-103 - Consolidate Expression creation for property references from method names and Order expressions. 2011-09-06 12:27:24 +02:00
Oliver Gierke
9bf6703c63 DATADOC-99 - ParameterExpressionProvider now uses parameter type instead of handed in type if assignable.
JpaQueryCreator hands Comparable into ParameterExpressionProvider to create ParameterExpression instances for Comparables. The ParameterExpressionProvider in turn now inspects the actual Parameter type and hand this one into the builder in case it's assignable (read: more concrete) to the given type requested.
2011-09-06 11:49:07 +02:00
Oliver Gierke
ab5aad51d5 DATAJPA-101 - Prepare 1.1.x development line. 2011-09-05 14:34:16 +02:00
Oliver Gierke
4976684e96 DATAJPA-101 - Prepare release of 1.1.0.M1. 2011-09-05 14:20:51 +02:00
Oliver Gierke
0b737586c8 Reference documentation formatting of XMLEditor. 2011-09-05 13:12:29 +02:00
Oliver Gierke
c6045de7ad DATAJPA-80, DATAJPA-91 - Updated reference documentation.
Mention PersistenceExceptionTranslator being activated when using the JPA namespace. Documented custom namespace attributes special to the JPA namespace.
2011-09-05 13:12:14 +02:00
Oliver Gierke
ca52ec29be DATAJPA-81 - SimpleJpaRepository.exists(…) now projects to the id to prevent the entire object being read and mapped. 2011-09-05 08:31:32 +02:00
Oliver Gierke
04349d25dc DATAJPA-86 - Pagination over queries using group-by works correctly.
Added handling of count methods for queries using group by. In case the count query returns multiple results we use the number of results instead of failing. If the result contains one result we use this one.

Moved hint handling to AbstractJpaQuery.
2011-09-04 16:56:50 +02:00
Oliver Gierke
170d31707c DATAJPA-96 - JpaQueryCreator now correctly resolves nested properties for all supported keywords.
Removed Part.toDotPath() references to create Expressions as they have to be atomic.
2011-09-04 14:56:39 +02:00
Oliver Gierke
7516816adb DATADOC-93 - Don't catch IllegalArgumentExceptions raised by missing domain class in JPA Metamodel.
We now don't catch an IllegalArgumentException being thrown in case a domain class is not found in the metamodel. If it occurs there's nothing we can do about it as we can't come up with an EntityInformation instance then and the persistence provider couldn't handle it anyway.
2011-09-04 14:25:27 +02:00
Oliver Gierke
b291a5f5f9 DATAJPA-98 - Formatted sources with Spring Data Eclipse formatting settings. 2011-09-02 18:11:10 +02:00
Oliver Gierke
d5651cdd86 Fixed project title. 2011-09-01 01:22:06 +02:00
Phillip Webb
27ad91fbbc DATAJPA-92 - JpaQueryCreator now inspects enum to decide how to handle ignore case scenarios. 2011-08-29 18:06:30 +02:00
Phillip Webb
aa6a7c1983 DATAJPA-94 - Repository queries consider Sort instance in a Pageable again. 2011-08-29 11:31:47 +02:00
Phil Webb
5b9e959b3e DATAJPA-92 - Added support for IgnoreCase keyword.
The query creation subsystem now supports using IgnoreCase when referencing String parameters, e.g.:

  findByUsernameIgnoreCase(String username);

Both 'IgnoreCase' and 'IgnoringCase' are supported. If you'd like to entirely ignore cases for all String property references add 'AllIgnoreCase' or 'AllIgnoringCase' to the query method.
2011-08-25 12:52:14 +02:00
Oliver Gierke
b6b386893e DATADOC-90 - Fixed potential concurrency problem for PartTree based query creation.
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-08-23 09:04:20 +02:00
Oliver Gierke
0144be5b16 DATADOC-90 - Refactored PartTreeJpaQuery to create new JpaQueryCreator on every query recreation.
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.
2011-08-21 14:33:55 +02:00
Oliver Gierke
160b738a4d DATACMNS-62 - Adapt changes in Spring Data Commons. 2011-08-21 14:33:00 +02:00
Phil Webb
480901a4ba DATAJPA-88 - Minor improvements to documentation. 2011-08-16 17:40:58 +02:00
Oliver Gierke
62ed80f389 Reverted version of javax.annotation to 0.0.0 in template.mf. 2011-08-12 14:59:16 +02:00
Oliver Gierke
20ad3fbe1a Fixed distribution name. 2011-08-12 14:58:39 +02:00
Oliver Gierke
9c802c207c Prepare 1.1.0 development. 2011-07-21 20:52:25 +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