Commit Graph

15 Commits

Author SHA1 Message Date
Oliver Gierke
6b1aabfa91 Added deleteInBatch method to JpaRepository.
Reverted implementation of delete(Iterable<T> entities) to iterate over the entities as creating a query can cause the persistence provider to choke on really large entity sets. Beyond that triggering a query would require us to clear the persistence context which might not be wanted in every case. Thus an additional method deleteInBatch(Iterable<T> entities) especially available on the JpaRepository interface now triggers the query but clearly states the assumptions and side effects in the JavaDoc. Removed some obsolete finals and an obsolete method.
2011-02-03 19:57:22 +00:00
Oliver Gierke
b884e7374f DATACMNS-12, DATAJPA-15 - transaction-manager-ref is now considered
Updated to latest changes in infrastructure in Spring Data Commons.
2011-01-26 17:51:16 +02:00
Oliver Gierke
c919e2a538 DATAJPA-9 - Expose flag to disable setting dates in auditing namespace.
Auditing namespace element now has a set-dates attribute that defaults to true, but also allows disabling that in case one wants to use database set values.
2011-01-25 16:42:11 +02:00
Oliver Gierke
d108bc9fed DATAJPA-13 - findOne(Specification s) now returns null if there is no result.
I chose not to return the arbitrary first result in case the Specification returns more than one result. First, there's no way to influence the order of the results so that we potentially get different results for the very same call. Beyond that this aligns with the semantics we have for finder methods that are supposed to return a single entity but actually don't.
2011-01-21 01:50:43 +01:00
Oliver Gierke
3db9240647 Fixed premature initialization of AuditorAware implementations.
Set bean scope of AuditingEntityListener to prototype to ensure DI for each instance. Before that AuditorAware implementations referencing a Repository would cause premature initialization of those as the AuditingEntityListener gets created and thus wired when the EntityManagerFactory gets created. At that point in time we unfortunately don't have no DAOs yet.

Added @DirtiesContext to AuditingEntitListenerIntegrationTest because otherwise the @Configurable backing prototype bean definition leaks into other test cases.
2011-01-20 19:28:03 +01:00
Oliver Gierke
b6767afadc Fixed missing application of Pageable handed to query methods using query derivation from the method name. 2011-01-20 12:10:28 +01:00
Oliver Gierke
b9b245df5e Adapted newly introduced Property abstraction.
Altered JpaQueryCreator to correctly add property traversals and joins based on Property. Added integration tests to verify property traversal on collections and simple properties.
2011-01-07 22:48:53 +01:00
Oliver Gierke
d17aa75944 Updated copyright notice to reach into 2011. 2011-01-02 14:12:57 +01:00
Oliver Gierke
2c17f4cab1 Cleaned up license headers to align correct formatting. 2010-12-29 13:57:57 +01:00
Oliver Gierke
b50b4f573b Adapt to latest changes in repository factory base classes. 2010-12-29 13:44:36 +01:00
Oliver Gierke
f2d92cec55 Removed all references to 'DAO'. 2010-12-29 13:01:43 +01:00
Oliver Gierke
33afdbe710 Re-activated @Configurable DI in AuditingEntityListener.
Added test cases to verify setting the auditor works.
2010-12-23 17:53:47 +01:00
Oliver Gierke
c8a3e79b6e Polished JavaDoc and code.
Removed any reference to Hades from JavaDoc and code. Use a logger instead of System.out in test cases.
2010-12-23 16:02:14 +01:00
Oliver Gierke
4d1188b751 Migrated query-from-methodname algorithm to PartTree infrastructure.
Query creation is not String based anymore but rather leverages the PartTree infrastructure and builds a JPA criteria API query instead. Changed query lookup and execution accordingly.
2010-12-07 20:43:54 +01:00
Oliver Gierke
e8c5666070 Initial commit of Spring JPA repository abstraction.
Port of the Hades project whereas the JPA independent part resides in Spring Data Commons Core. Reflect changes refactorings for DATACMNS-2, DATACMNS-3, DATACMNS-4, DATACMNS-5, DATACMNS-6, DATACMNS-8, DATACMNS-9, DATAJPA-2.
2010-11-28 18:20:47 +01:00