From 1cd27f8c1de857c94909d4e3b0235c6646cae58f Mon Sep 17 00:00:00 2001 From: hns Date: Tue, 14 May 2002 16:37:14 +0000 Subject: [PATCH] Did some fixes in setConstraint() which now checks if the backward mapping is a primitive mapping or an object reference. Also allow the method to be called for group-by collections, which is why the new code should be regarded as experimental. Removed some dead code. --- src/helma/objectmodel/db/Relation.java | 48 ++++++++------------------ 1 file changed, 15 insertions(+), 33 deletions(-) diff --git a/src/helma/objectmodel/db/Relation.java b/src/helma/objectmodel/db/Relation.java index 94867cfc..c8826527 100644 --- a/src/helma/objectmodel/db/Relation.java +++ b/src/helma/objectmodel/db/Relation.java @@ -153,10 +153,6 @@ public class Relation { constraints = new Constraint[cnst.size()]; cnst.copyInto (constraints); - - // System.err.println ("PARSED RELATION "+this); - // if (accessor != null) - // System.err.println ("SET ACCESSOR: "+accessor); } } @@ -401,25 +397,6 @@ public class Relation { cnst.addElement (new Constraint (local, otherType.getTableName (), foreign, false)); columnName = local; } - /* if ("_properties".equalsIgnoreCase (propName) || virtual) { - String subnodes2props = props.getProperty (propName+".aresubnodes"); - subnodesAreProperties = "true".equalsIgnoreCase (subnodes2props); - if (virtual) { - String subnodefilter = props.getProperty (propName+".subnoderelation"); - if (subnodefilter != null) { - Constraint c = null; // parseConstraint_v1 (subnodefilter); - if (c != null) { - cnst.add (c); - } - } - } - // update virtual mapping, if it already exists - if (virtualMapping != null) { - virtualMapping.subnodesRel = getVirtualSubnodeRelation (); - virtualMapping.propertiesRel = getVirtualPropertyRelation (); - virtualMapping.lastTypeChange = ownType.lastTypeChange; - } - } */ } @@ -674,24 +651,29 @@ public class Relation { for (int i=0; i