OPENJPA-885 Committing code and tests contributed by Dianne Richards.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@755469 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jeremy Bauer 2009-03-18 04:01:14 +00:00
parent 65a8219817
commit 2e5a6e4478
2 changed files with 5 additions and 1 deletions

View File

@ -1012,7 +1012,10 @@ public class AnnotationPersistenceMetaDataSerializer
if (vmd.getCascadeRefresh() == ValueMetaData.CASCADE_IMMEDIATE) { if (vmd.getCascadeRefresh() == ValueMetaData.CASCADE_IMMEDIATE) {
cascades.add(CascadeType.REFRESH); cascades.add(CascadeType.REFRESH);
} }
if (cascades.size() == 4) // ALL if (vmd.getCascadeDetach() == ValueMetaData.CASCADE_IMMEDIATE) {
cascades.add(CascadeType.CLEAR);
}
if (cascades.size() == 5) // ALL
{ {
cascades.clear(); cascades.clear();
cascades.add(CascadeType.ALL); cascades.add(CascadeType.ALL);

View File

@ -1475,6 +1475,7 @@ public class EntityManagerImpl
} }
public void clear(Object entity) { public void clear(Object entity) {
assertNotCloseInvoked();
_broker.detach(entity, this); _broker.detach(entity, this);
} }