From 32f0f7830d04bdd0b73a0d5e8ad622f84c378edb Mon Sep 17 00:00:00 2001 From: Thomas Darimont Date: Tue, 1 Oct 2013 13:25:46 +0200 Subject: [PATCH] DATAJPA-406 - Fix documentation of default value in @Modifying. Corrected documentation to reflect the actual state of the @Modifying annotation which is that the clearAutomatically attribute is set to false by default. The implications of setting this attribute to true (which causes all pending non-flushed changes to be dropped) are now stated clearly. Original pull request: #43. --- src/docbkx/jpa.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/docbkx/jpa.xml b/src/docbkx/jpa.xml index 8e7c4b409..258b4bf59 100644 --- a/src/docbkx/jpa.xml +++ b/src/docbkx/jpa.xml @@ -801,16 +801,15 @@ int setFixedFirstnameFor(String firstname, String lastname); This will trigger the query annotated to the method as updating query instead of a selecting one. As the EntityManager might contain outdated - entities after the execution of the modifying query, we automatically - clear it (see JavaDoc of + entities after the execution of the modifying query, we do not + automatically clear it (see JavaDoc of EntityManager.clear() - for details). This will effectively drop all non-flushed changes still - pending in the EntityManager. If you - don't wish the EntityManager to be - cleared automatically you can set - @Modifying annotation's - clearAutomatically attribute to - false; + for details) since this will effectively drop all non-flushed changes + still pending in the EntityManager. If + you wish the EntityManager to be cleared + automatically you can set @Modifying + annotation's clearAutomatically attribute to + true;
@@ -1132,7 +1131,8 @@ public interface UserRepository extends JpaRepository<User, Long> { orm.xml to be used for all entities in your persistence contexts: - Note that the auditing feature requires spring-aspects.jar to be on the classpath. + Note that the auditing feature requires + spring-aspects.jar to be on the classpath. Auditing configuration orm.xml