Fix bug in getExactPropertyMapping() where we returned the type of the collection

contents rather than the type of the collection itself. Fixes bug 330.
http://helma.org/bugs/show_bug.cgi?id=330
This commit is contained in:
hns 2004-01-30 12:35:43 +00:00
parent b379b9050e
commit f2ad5ea065

View file

@ -611,7 +611,16 @@ public final class DbMapping implements Updatable {
public DbMapping getExactPropertyMapping(String propname) {
Relation rel = getExactPropertyRelation(propname);
return (rel != null) ? rel.otherType : null;
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.otherType;
}
}
return null;
}
/**