Fixed getPropertyMapping returning the wrong Mapping for prototyped virtual nodes

This commit is contained in:
hns 2001-01-05 19:25:15 +00:00
parent 9ebf16475b
commit cb33854282

View file

@ -245,7 +245,14 @@ public class DbMapping {
if (propname == null)
return properties;
Relation rel = (Relation) prop2db.get (propname.toLowerCase());
return rel != null && !rel.virtual ? rel.other : properties;
if (rel != null) {
// if this is a virtual node, it doesn't have a dbmapping
if (rel.virtual && rel.prototype == null)
return null;
else
return rel.other;
}
return properties;
}
public void setPropertyMapping (DbMapping pm) {