Skip to content

Commit 0ec18e3

Browse files
committed
DATAJPA-1761 - Removed superfluous save from example code.
1 parent d35ee1a commit 0ec18e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/asciidoc/jpa.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ class UserManagementImpl implements UserManagement {
911911
912912
for (User user : userRepository.findAll()) {
913913
user.addRole(role);
914-
userRepository.save(user);
914+
// note that no call to "save" is necessary since the entities are attached to the EntityManager
915915
}
916916
}
917917
----

0 commit comments

Comments
 (0)