mirror of https://github.com/apache/openjpa.git
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:
parent
65a8219817
commit
2e5a6e4478
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue