Commit Graph

166 Commits

Author SHA1 Message Date
Oliver Gierke
2db3b9b5df DATAJPA-506 - Re-enabled query method invocation with wrapper type results.
The custom handling for Blobs applies to strict conversion as it uses the simple method return type to decide whether to trigger a conversion. It now rather uses the returned domain type which automatically unwraps wrapper types like Guava's Optional.

Applied some polishing to the ConversionService setup in JpaQueryExecution to make more obvious that it's only mean to execute very specific conversions.

Added Guava as test dependency and explicit dependency for the Mysema APT plugin as the test scope only would make it invisible for the plugin.
2014-07-07 17:37:27 +02:00
Oliver Gierke
eb341782d1 DATAJPA-566 - Adapt dependencies to Spring 4 upgrade. 2014-07-01 10:50:16 +02:00
Oliver Gierke
0bafff1e1c DATAJPA-542 - After release cleanups. 2014-05-20 19:53:31 +02:00
Spring Buildmaster
e1bf6aefa3 DATAJPA-542 - Prepare next development iteration. 2014-05-20 09:19:38 -07:00
Spring Buildmaster
4bb061eb79 DATAJPA-542 - Release version 1.6.0.RELEASE. 2014-05-20 09:19:35 -07:00
Oliver Gierke
d2a792c101 DATAJPA-542 - Prepare 1.6 GA. 2014-05-20 16:57:00 +02:00
Oliver Gierke
da9b8eb3a7 DATAJPA-522 - After release cleanups. 2014-05-02 15:27:17 +02:00
Spring Buildmaster
9cf5cb780b DATAJPA-522 - Prepare next development iteration. 2014-05-02 05:01:17 -07:00
Spring Buildmaster
27fdb9c287 DATAJPA-522 - Release version 1.5.0.RC1. 2014-05-02 05:01:14 -07:00
Oliver Gierke
bf020c6a96 DATAJPA-522 - Prepare 1.6.0.RC1.
Upgraded to Spring Data Parent 1.4.0.RC1 and Spring Data Commons 1.8.0.RC1. Switched to milestone repository.
2014-05-02 13:53:27 +02:00
Spring Buildmaster
4dd570f670 DATAJPA-481 - Prepare next development iteration. 2014-03-31 16:22:52 +02:00
Spring Buildmaster
6cc0f9f835 DATAJPA-481 - Release version 1.6.0.M1. 2014-03-31 07:19:11 -07:00
Thomas Darimont
398c87007d DATAJPA-481 - Prepare release 1.6 M1.
Updated Spring Data Commons and Spring Data Build version in pom.xml. Update pom.xml to use milestone repository. Update reference documentation to use recent Spring Data Commons version. Update changelog to reflect recent changes / releases. Update version in notice & readme.

Original pull request: #75.
2014-03-31 16:11:13 +02:00
Thomas Darimont
dd64fe21ea DATAJPA-466 - Add support for lazy loading configuration via JPA 2.1 fetch-/loadgraph.
We now support load-graph / fetch-graph QueryHints on repository query methods, which are applied when a JPA 2.1 capable JPA implementation is used. We explicitly reject the usage of those hints in case the user is running a JPA 2.0 provider.

FetchGraphs / LoadGraphs can now be defined on the Entity via the @NamedEntityGraphs annotation.

@Entity
@QueryEntity
@NamedEntityGraphs(@NamedEntityGraph(name = "GroupInfo.members", attributeNodes = @NamedAttributeNode("members")))
public class GroupInfo {

  @ManyToMany List<GroupMember> members = new ArrayList<GroupMember>(); //default fetch mode is "lazy".
}

The entity graph "GroupInfo.members" overwrites the fetch-mode of the members collection to be "eager".

The entity graph to be used can now configured on a repository query method.

@Repository
public interface GroupRepository extends CrudRepository<GroupInfo, String> {

	@EntityGraph("GroupInfo.members")
	GroupInfo getByGroupName(String name);
}

The new method JpaQueryMethod#getEntityGraph analyses an @EntityGraph annotation and constructs a new JpaEntityGraph value object that contains the information form the annotation. The new method AbstractJpaQuery#applyEntityGraphConfiguration tries to apply the given EntityGraph configuration if the used JPA persistence provider supports the JPA 2.1 spec.

Changed the class path order such that EclipseLink is now placed before the eclipse dependency. EclipseLink references the JPA 2.1 API and allows us to provide type-safe support for the new JPA 2.1 features.

Original pull request: #74.
2014-03-30 16:42:36 +02:00
Oliver Gierke
a6d6cc0799 DATAJPA-485 - Upgraded build profile to Hibernate 4.2.11. 2014-03-19 13:37:43 +01:00
Thomas Darimont
d868d0bf8a DATAJPA-485 - Upgraded hibernate-jpamodelgen to 1.3.0.Final. 2014-03-10 12:17:32 +01:00
Oliver Gierke
d42a929d03 DATAJPA-493 - Upgraded to OpenJPA 2.3.0.
Upgraded to OpenJPA 2.3.0 and enabled test cases previously ignored because of bugs in previous versions.
2014-03-07 19:16:47 +01:00
Oliver Gierke
55735fb27b DATAJPA-485 - Upgraded to Hibernate profiles to 4.3.4 and 4.2.10. 2014-03-04 11:22:52 +01:00
Spring Buildmaster
8aa5fa5ca0 DATAJPA-469 - Prepare next development iteration. 2014-02-24 15:14:33 +01:00
Spring Buildmaster
bbb5cae6cd DATAJPA-469 - Release version 1.5.0.RELEASE. 2014-02-24 06:09:49 -08:00
Thomas Darimont
3c30ba2bba DATAJPA-469 - Prepare 1.5.0.RELEASE.
Updated change log, readme, notice. Updated links in index.xml to point to SD Commons documentation.

Original pull request: #60.
2014-02-24 15:04:24 +01:00
Christoph Strobl
7e2d7831a4 DATAJPA-470 - Update Documentation.
Update urls to point to spring.io. Added missing id tag to documentation sections. Fix some typos in reference manual. Update readme.md to use consistent set of database and dialect. Add missing end tag for 'para' in FAQ section. Update authors for proper rendering in PDF. Added productname tag. Added links to Stack Overflow.

Original pull request: #59.
2014-02-24 11:57:19 +01:00
Oliver Gierke
246eb989fc DATAJPA-469 - Upgraded to Spring Data Commons snapshots. 2014-02-19 20:08:58 +01:00
Oliver Gierke
112d76ac9d DATAJPA-459 - Suppress verbose output for Querydsl APT generation. 2014-02-06 19:21:07 +01:00
Spring Buildmaster
869be7eafc DATAJPA-450 - Prepare next development iteration. 2014-01-29 04:43:57 -08:00
Spring Buildmaster
d5e166b469 DATAJPA-450 - Release version 1.5.0.RC1. 2014-01-29 04:43:55 -08:00
Oliver Gierke
c6f486eee2 DATAJPA-450 - Prepare 1.5.0.RC1 release.
Upgraded to Spring Data build parent 1.3 RC1 and Spring Data Commons 1.7 RC1. Updated changelog and references from reference documentation. Switched to milestone repository.
2014-01-28 13:36:23 +01:00
Oliver Gierke
655ad131d2 DATAJPA-444 - Prefer Hibernate 4.3 provider interface over legacy one.
Accessing the legacy persistence provider class in Hibernate 4.3 causes a warning being logged. As we generally want to detect the presence of Hibernate in general only, we now check for the Hibernate 4.3 persistence provider interface first to immediately find the new interface and thus avoid the warning.

Upgraded to Hibernate 4.3.1.
2014-01-24 17:12:44 +01:00
Oliver Gierke
cae3ce4532 DATAJPA-450 - Removed Spring dependency versions.
Added plugin repository and changed to libs-snapshot to correctly lookup Bundlor and other project dependencies.
2014-01-20 13:02:48 +01:00
Oliver Gierke
9640ea81ad DATAJPA-417 - Upgraded to EclipseLink 2.5.1.
Was able to upgrade to EclipseLink 2.5.1 and re-enable a previously ignored integration tests. However, some of the disabled test cases still fail despite the relevant bug being reported as fixed in 2.5.1.

Turned the workaround in QueryUtils into a TODO for removal as we don't want to strongly force EclipseLink users to upgrade to 2.5.x yet.
2014-01-17 17:12:20 +01:00
Oliver Gierke
3f4eecf97e DATAJPA-443 - Upgraded to Hibernate 4.2.8 and 4.3.0. 2014-01-12 19:25:42 +01:00
Oliver Gierke
516977f722 DATAJPA-428 - Upgraded to snapshot of Spring Data build parent. 2014-01-12 19:25:42 +01:00
Oliver Gierke
44994ff3e9 DATAJPA-435 - Let Sonar reuse existing test reports. 2013-12-11 13:21:54 +01:00
Oliver Gierke
ae10332b18 DATAJPA-430 - Tweaks to be compatible with Hibernate 4.3.
Latest Hibernate 4.3 releases have changes some behavior and internals slightly. Adapted the test cases accordingly and added another guard in JpaMetamodelEntityInformation to adhere to the new behavior.

Added build profile to be able to build against Hibernate 4.3.
2013-12-09 14:44:13 +01:00
Oliver Gierke
5d6e44d379 DATAJPA-12 - Simplified build setup for meta-model creation.
Consolidated the generation of the static meta-model for test classes into the Querydsl APT plugin.
2013-12-08 19:30:54 +01:00
Oliver Gierke
1d6806b979 DATAJPA-12 - Design changes in JpaSort.
Decided to go with a simpler way of building up attribute paths on JpaSort to avoid the need to work with JPA Path instances (and thus the EntityManager) entirely. Added shortcut constructors to JpaSort that take a vararg of Attribute or PluralAttribute respectively.

Interestingly, the test cases still have to be integration tests as the  fields in the statically generated meta-model are null until the EntityManagerFactory bootstrap process enhances them to contain actual values. So no real unit tests unfortunately.

Consolidated tests cases for MailMessageRepository into one class, especially to avoid the configuration QueryDslRepositorySupportIntegrationTests to interfere with the newly added tests. Also rather use SampleConfig configuration class to allow the test framework's caching mechanism to kick in.

Original pull request: #54.
2013-12-07 13:10:29 +01:00
Thomas Darimont
692b2382bf DATAJPA-12 - Added Sort implementations for JPA meta-model API and Querydsl.
Introduced JpaSort for sorting by JPA meta-model attribute paths. Introduced JpaMetaModelPathBuilder that can be used to ease the construction of Jpa meta-model attribute paths by the provided static factory method. Added new testing scenario (MailMessage and MailSender) to avoid to mess up the existing sample classes. Enabled static JPA meta-model generation in pom.xml.

Enhanced Querydsl to generate appropriate left joins when sorting by nested (singular) association properties. Converted XML configuration for QueryDslRepositorySupportIntegrationTests into JavaConfig.

Original pull request: #54.
2013-12-07 13:09:31 +01:00
Spring Buildmaster
32f90661e0 DATAJPA-428 - Prepare next development iteration. 2013-11-19 04:29:39 -08:00
Spring Buildmaster
4df4d3eecb DATAJPA-428 - Release version 1.5.0.M1. 2013-11-19 04:29:37 -08:00
Oliver Gierke
8aafc4fb6c DATAJPA-428 - Prepare release 1.5.0.M1.
Upgraded to Spring Data Commons 1.7.0.M1 and Spring Data Build 1.3.0.M1. Use milestone repository instead of snapshot repo. Let reference documentation refer to 1.7 M1 reference in Spring Data Commons. Updated changelog, notice and readme.
2013-11-19 13:21:43 +01:00
Thomas Darimont
44806cb7f1 DATAJPA-265 - Support for auditing configuration via JavaConfig.
Introduces the necessary infrastructure to configure auditing with JPA via JavaConfig using @EnableJpaAuditing.

Original pull request: #50.
2013-11-11 20:20:05 +01:00
Oliver Gierke
5be0897d08 DATAJPA-481 - Upgraded to Spring Framework 3.2.4.
Upgraded to Spring Data Build 1.3.0.BUILD-SNAPSHOT to benefit from upgrade to Spring Framework 3.2.4.
2013-10-25 19:43:06 +02:00
Thomas Darimont
c6c4a3b344 DATAJPA-386 - Prepare for next iteration.
Updated pom.xml to refer to the current version of SD Commons 1.7.0.BUILD-SNAPSHOT.
2013-09-18 13:19:15 +02:00
Spring Buildmaster
2a2255dca9 DATAJPA-386 - Prepare next development iteration. 2013-09-09 15:30:01 -07:00
Spring Buildmaster
0e2663e9a4 DATAJPA-386 - Release version 1.4.0.RELEASE. 2013-09-09 15:29:59 -07:00
Thomas Darimont
d41a466b4d DATAJPA-386 - Prepare 1.4.0 Release. 2013-09-09 15:26:18 -07:00
Oliver Gierke
e5e4b4dd3b DATAJPA-347 - Upgrade to Spring Data Commons 1.6.0.BUILD-SNAPSHOT. 2013-08-14 09:24:53 +02:00
Spring Buildmaster
1f571ad751 DATAJPA-347 - Prepare nexte development iteration. 2013-08-01 09:18:13 -07:00
Spring Buildmaster
5505f9cd60 DATAJPA-347 - Release version 1.4.0.RC1. 2013-08-01 09:18:09 -07:00
Oliver Gierke
d4119dcdbe DATAJPA-379 - Prepare 1.4.0.RC1 release.
Upgraded to Spring Data Build parent 1.1.1.RELEASE. Upgraded to Spring Data Commons 1.6.0.RC1. Switched to milestone repository. Adapted documentation references to RC1 of SPring Data Commons. Updated changelog, notice and readme.
2013-08-01 18:07:32 +02:00