OPENJPA-2284: Save NPE while parsing cascade - back ported to 2.0.x Pinaki's commit to trunk.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/2.0.x@1419659 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Heath Thomann 2012-12-10 18:52:09 +00:00
parent 7f89076981
commit 3958529f1f
1 changed files with 2 additions and 4 deletions

View File

@ -1229,10 +1229,8 @@ public class XMLPersistenceMetaDataParser
return;
ValueMetaData vmd = fmd;
switch (_strategy) {
case ONE_MANY:
case MANY_MANY:
vmd = fmd.getElement();
if (_strategy == ONE_MANY || _strategy == MANY_MANY) {
vmd = fmd.getElement();
}
for (CascadeType cascade : cascades) {
switch (cascade) {