Commit Graph

170 Commits

Author SHA1 Message Date
Oliver Gierke
aef195eaed DATAJPA-129 - Allow definition of NamedQuery name to be used in @Query.
@Query now has a name attribute that allows defining the NamedQuery name to be used to override the convention based ${domainClass}.${finderMethodName}.
2011-12-03 01:30:53 +01:00
Oliver Gierke
c134e10727 DATAJPA-117 - Added nativeQuery flag to @Query.
@Query can now be used to execute native queries by setting the nativeQuery flag of the annotation to true. Polished JavaDoc of the @Query annotation. Upgraded EclipseLink dependency to 2.3.1 as we stumble over a NullPointerException otherwise which is fixed in the current one.
2011-12-03 00:34:23 +01:00
Oliver Gierke
7d6216285e DATAJPA-120 - Replaced @OneToOne with @ManyToOne in AbstractAuditable. 2011-12-02 17:47:07 +01:00
Oliver Gierke
add1336ed1 DATACMNS-91 - Enforce parameter handling defined by CrudRepository.
Reject null values for id and entity values. Polished JavaDoc in terms of parameter specification.
2011-12-02 17:47:07 +01:00
Oliver Gierke
a8acfed05e DATAJPA-127 - Use 4.0.0.RELEASE as upper exclusive Spring dependency version bound.
Use repo.springsource.org as repository URL.
2011-12-02 17:46:59 +01:00
Oliver Gierke
6cda41ba39 Fixed Maven properties not to contain dot hierarchies as this breaks docbook generation.
See http://code.google.com/p/docbkx-tools/issues/detail?id=20 for details.
2011-12-02 17:46:59 +01:00
Oliver Gierke
45bcdb60ac DATAJPA-127 - Setup hybrid Spring 3.0.6 / 3.1 build.
Removed deprecated usage of XmlBeanFactory in tests.
2011-12-02 17:46:40 +01:00
Oliver Gierke
5ffbb4f1d1 DATAJPA-102 - Upgraded to Querydsl 2.2.5. 2011-11-23 12:37:57 +01:00
Oliver Gierke
70b42b8ba3 Removed unused import. 2011-11-23 12:35:26 +01:00
Oliver Gierke
99e04dbcae DATACMNS-98 - Adapt refactorings. 2011-11-23 12:27:26 +01:00
Oliver Gierke
eaaad64774 Added missing quote in reference documentation. 2011-11-08 13:28:04 +01:00
Oliver Gierke
02558854de DATAJPA-115 - Upgraded to Querydsl 2.2.3. 2011-10-14 14:37:30 +02:00
Oliver Gierke
d6c4c2ef12 Polished UserRepositoryTests. 2011-10-12 11:36:48 +02:00
Oliver Gierke
db8aebe4d7 DATAJPA-111 - Removed unnecessary em.clear() from mass delete methods. 2011-10-12 11:36:33 +02:00
Oliver Gierke
c8a0f0d3b6 DATAJPA-110 - Fixed alias detection for entity names containing numbers. 2011-10-11 18:23:21 +02:00
Oliver Gierke
54f8cb8700 DATAJPA-108 - Added support for GreaterThanEqual and LessThanEqual. 2011-10-11 18:15:25 +02:00
Oliver Gierke
515a85f005 DATAJPA-113 - Improved DI for QueryDslRepositorySupport.
Removed @Required annotation from the setter for EntityManager property. The annotation triggered a dependency check that was not aware of the EntityManager being injected by a PersistenceAnnotationBeanPostProcessor. As we already have a validation callback using @PostConstruct we can simply rely on the not-null check for the EntityManager being implemented there.
2011-10-11 12:57:05 +02:00
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