Node.getNonVirtualParent doesn't work correctly for transient nodes, so add

a try-catch when setting the back-reference in Relation.setConstraints() since
it may fail.
This commit is contained in:
hns 2004-02-04 16:32:04 +00:00
parent 3101e32ad3
commit c6e5dcbc95

View file

@ -1044,8 +1044,11 @@ public final class Relation {
if ((currentValue == null) ||
((currentValue != home) &&
((currentValue.getState() == Node.TRANSIENT) ||
(home.getState() != Node.TRANSIENT)))) {
(home.getState() != Node.TRANSIENT)))) try {
child.setNode(crel.propName, home);
} catch (Exception ignore) {
// in some cases, getNonVirtualParent() doesn't work
// correctly for transient nodes, so this may fail.
}
} else if (crel.reftype == PRIMITIVE) {
child.setString(crel.propName, home.getID());