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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.