rset.py
changeset 10187 0df931eb08de
parent 10087 ed0b076c119b
parent 10180 ea10572fccfe
child 10313 ae9e23cf8790
--- a/rset.py	Mon Feb 02 12:32:07 2015 +0100
+++ b/rset.py	Thu Feb 05 15:49:02 2015 +0100
@@ -521,6 +521,7 @@
     def _rset_structure(self, eschema, entity_col):
         eid_col = col = entity_col
         rqlst = self.syntax_tree()
+        get_rschema = eschema.schema.rschema
         attr_cols = {}
         rel_cols = {}
         if rqlst.TYPE == 'select':
@@ -532,10 +533,7 @@
         # take care, due to outer join support, we may find None
         # values for non final relation
         for i, attr, role in attr_desc_iterator(select, col, entity_col):
-            if role == 'subject':
-                rschema = eschema.subjrels[attr]
-            else:
-                rschema = eschema.objrels[attr]
+            rschema = get_rschema(attr)
             if rschema.final:
                 if attr == 'eid':
                     eid_col = i