Commits on Jan 30, 2012
Commits on Jan 11, 2012
  1. DATAJPA-142 - Allow using a NamedQuery for count queries in pagination.

    olivergierke committed Jan 11, 2012
    We will now prefer a declared NamedQuery for count queries instead of deriving it from the actual NamedQuery under the following conditions:
    - by default a query named ${namedQueryName}.count exists
    - the name of the NamedQuery to be used is defined in @Query(countQueryName = "…")
    Note that a potential reconfiguration of the NamedQuery name will be taken into account for the according count query name to assure symmetry. Examples
    Page<User> findByLastname(String lastname, Pageable pageable)
    NamedQuery name: User.findByLastname
    Count NamedQuery name: User.findByLastname.count
    @Query(name = "")
    Page<User> findByLastname(String lastname, Pageable pageable)
    NamedQuery name:
    Count NamedQuery name:
    @Query(countName = "")
    Page<User> findByLastname(String lastname, Pageable pageable)
    NamedQuery name: User.findByLastname
    Count NamedQuery name:
    @Query(name = "", countName = "something")
    Page<User> findByLastname(String lastname, Pageable pageable)
    NamedQuery name:
    Count NamedQuery name: something
  2. DATAJPA-138 - Make MergingPesistenceUnitManager work again.

    olivergierke committed Dec 14, 2011
    Override isPersistenceUnitOverrideAllowed() newly introduced in Spring 3.1.1 to indicate we can deal with persistence units of the same name. For Spring 3.0.x versions the implementation was not broken.
  3. DATAJPA-150 - Upgraded persistence provider dependencies.

    olivergierke committed Jan 11, 2012
    Upgraded Hibernate to 3.6.9, EclipseLink to 2.3.2 as well as OpenJpa 2.1.1.
Commits on Dec 22, 2011
Commits on Dec 19, 2011
  1. DATAJPA-136 - Initial draft of CDI integration.

    DirkMahler authored and olivergierke committed Dec 14, 2011
    Implemented CDI integration based on the Spring Data Commons code introduced in DATACMNS-110.
Commits on Dec 15, 2011
  1. DATAJPA-141 - JpaMetamodelEntityInformation now works with MappedSupe…

    olivergierke committed Dec 15, 2011
    …rclasses as well.
    We now call Metamodel.managedClass(…) instead of Metamodel.entityType(…) to be able to detect ids in @MappedSuperclass types as well. Unfortunately this currently still fails with Hibernate as theit Metamodel implementation only considers entities. See [0] for further details.
Commits on Dec 9, 2011
  1. DATAJPA-135 - Improved extensibility of QueryDslRepositorySupport.

    olivergierke committed Dec 9, 2011
    Moved @PersistenceContext annotation to the setter method to make it overridable and thus re-configurable. Introduced protected getEntityManager() method to allow subclasses having access to the EntityManager.
Commits on Dec 6, 2011
  1. DATAJPA-73 - Added support for locking.

    olivergierke committed Dec 6, 2011
    Repository query methods can now be equipped with a @Lock annotation that carries the LockModeType to be used when executing the query. Beyond that, CRUD methods can be redeclared to carry lock metadata as well.
    interface UserRepository extends Repository<User, Long> {
      // CRUD method redeclaration
      List<User> findAll();
      // Query method
      List<User> findByLastname(String lastname);
Commits on Dec 5, 2011
  1. DATAJPA-124 - Optimized pagination execution.

    nurkiewicz authored and olivergierke committed Nov 10, 2011
    For pagination we already need to trigger a count query to find out the total number of pages available. Now if there are less elements available than the offset of the current page points to we don't need to trigger the actual content reading query at all. E.g. if there's only 20 elements in the database and we request page 3 by a page size of 10 we already know that there won't be any elements found.
    Implemented that optimization for general CRUD pagination as well as pagination in query methods.
  2. DATAJPA-123, DATAJPA-122 - Updated reference documentation.

    olivergierke committed Dec 5, 2011
    Added documentation of ClasspathScanningPersistenceUnitPostProcessor to reference documentation.
  3. DATAJPA-132 - Implemented handling of True and False keywords on quer…

    olivergierke committed Dec 5, 2011
    …y creation.
    Query derivation mechanism now supports True and False as keywords in finder methods:
    class User {
      boolean active;
    interface UserRepository<User, Long> {
      List<User> findByActiveTrue() ;
Commits on Dec 3, 2011
  1. DATAJPA-123 - Added classpath-scanning PersistenceUnitPostProcessor.

    olivergierke committed Dec 3, 2011
    Added ClasspathScanningPersistenceUnitPostProcessor that will scan the configured base package for classes annotated with @Entity or @MappedSuperclass and add them to the PersistenceUnit handled.
    Beyond that it will scan for JPA XML mapping files if an optional mapping file name pattern is configured on the PUPP instance.
  2. DATAJPA-129 - Allow definition of NamedQuery name to be used in @Query.

    olivergierke committed Dec 3, 2011
    @Query now has a name attribute that allows defining the NamedQuery name to be used to override the convention based ${domainClass}.${finderMethodName}.
Commits on Dec 2, 2011
  1. DATAJPA-117 - Added nativeQuery flag to @Query.

    olivergierke committed Dec 2, 2011
    @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.
  2. DATACMNS-91 - Enforce parameter handling defined by CrudRepository.

    olivergierke committed Dec 2, 2011
    Reject null values for id and entity values. Polished JavaDoc in terms of parameter specification.
  3. DATAJPA-127 - Use 4.0.0.RELEASE as upper exclusive Spring dependency …

    olivergierke committed Dec 1, 2011
    …version bound.
    Use as repository URL.
  4. DATAJPA-127 - Setup hybrid Spring 3.0.6 / 3.1 build.

    olivergierke committed Nov 28, 2011
    Removed deprecated usage of XmlBeanFactory in tests.
Commits on Nov 23, 2011
  1. Removed unused import.

    olivergierke committed Nov 23, 2011
Commits on Nov 8, 2011
Commits on Oct 14, 2011
Commits on Oct 12, 2011
Commits on Oct 11, 2011
  1. DATAJPA-113 - Improved DI for QueryDslRepositorySupport.

    olivergierke committed Oct 11, 2011
    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.
Commits on Oct 7, 2011
Commits on Sep 30, 2011