From f2ad5ea06501fbcd8fdc512ae9691f1177bf9aaa Mon Sep 17 00:00:00 2001 From: hns Date: Fri, 30 Jan 2004 12:35:43 +0000 Subject: [PATCH] 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 --- src/helma/objectmodel/db/DbMapping.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/helma/objectmodel/db/DbMapping.java b/src/helma/objectmodel/db/DbMapping.java index d2500fa5..7d2e38eb 100644 --- a/src/helma/objectmodel/db/DbMapping.java +++ b/src/helma/objectmodel/db/DbMapping.java @@ -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; } /**