mirror of
https://github.com/google/nomulus
synced 2026-09-19 14:34:18 +00:00
Detach entities loaded by loadSingleton() (#1184)
* Detach entities loaded by loadSingleton() * Reformatted
This commit is contained in:
+1
-1
@@ -504,7 +504,7 @@ public class JpaTransactionManagerImpl implements JpaTransactionManager {
|
||||
elements.size() <= 1,
|
||||
"Expected at most one entity of type %s, found at least two",
|
||||
clazz.getSimpleName());
|
||||
return elements.stream().findFirst();
|
||||
return elements.stream().findFirst().map(this::detach);
|
||||
}
|
||||
|
||||
private int internalDelete(VKey<?> key) {
|
||||
|
||||
Reference in New Issue
Block a user