rset.py
changeset 3720 5376aaadd16b
parent 3629 559cad62c786
parent 3689 deb13e88e037
child 3777 3ef8cdb5fb1c
--- a/rset.py	Thu Oct 15 11:20:26 2009 +0200
+++ b/rset.py	Mon Oct 19 15:16:41 2009 +0200
@@ -396,7 +396,7 @@
         etype = self.description[row][col]
         try:
             eschema = self.vreg.schema.eschema(etype)
-            if eschema.is_final():
+            if eschema.final:
                 raise NotAnEntity(etype)
         except KeyError:
             raise NotAnEntity(etype)
@@ -461,14 +461,14 @@
                 if outerselidx is None:
                     continue
                 if x == 'subject':
-                    rschema = eschema.subject_relation(attr)
-                    if rschema.is_final():
+                    rschema = eschema.subjrels[attr]
+                    if rschema.final:
                         entity[attr] = rowvalues[outerselidx]
                         continue
                     tetype = rschema.objects(etype)[0]
                     card = rschema.rproperty(etype, tetype, 'cardinality')[0]
                 else:
-                    rschema = eschema.object_relation(attr)
+                    rschema = eschema.objrels[attr]
                     tetype = rschema.subjects(etype)[0]
                     card = rschema.rproperty(tetype, etype, 'cardinality')[1]
                 # only keep value if it can't be multivalued
@@ -541,7 +541,7 @@
         locate_query_col = col
         rqlst = self.syntax_tree()
         etype = self.description[row][col]
-        if self.vreg.schema.eschema(etype).is_final():
+        if self.vreg.schema.eschema(etype).final:
             # final type, find a better one to locate the correct subquery
             # (ambiguous if possible)
             for i in xrange(len(rqlst.children[0].selection)):
@@ -550,7 +550,7 @@
                 coletype = self.description[row][i]
                 if coletype is None:
                     continue
-                if not self.vreg.schema.eschema(coletype).is_final():
+                if not self.vreg.schema.eschema(coletype).final:
                     etype = coletype
                     locate_query_col = i
                     if len(self.column_types(i)) > 1: