entity.py
branchstable
changeset 6124 c5900230809b
parent 6100 3cd1e6a74830
child 6142 8bc6eac1fac1
child 6258 9b5c008267b0
equal deleted inserted replaced
6123:0d0a87e88281 6124:c5900230809b
   710             var = varmaker.next()
   710             var = varmaker.next()
   711             rql.append('%s %s %s' % (V, attr, var))
   711             rql.append('%s %s %s' % (V, attr, var))
   712             selected.append((attr, var))
   712             selected.append((attr, var))
   713         # +1 since this doen't include the main variable
   713         # +1 since this doen't include the main variable
   714         lastattr = len(selected) + 1
   714         lastattr = len(selected) + 1
   715         if attributes is None:
   715         # don't fetch extra relation if attributes specified or of the entity is
       
   716         # coming from an external source (may lead to error)
       
   717         if attributes is None and self.cw_metainformation()['source']['uri'] == 'system':
   716             # fetch additional relations (restricted to 0..1 relations)
   718             # fetch additional relations (restricted to 0..1 relations)
   717             for rschema, role in self._cw_to_complete_relations():
   719             for rschema, role in self._cw_to_complete_relations():
   718                 rtype = rschema.type
   720                 rtype = rschema.type
   719                 if self.cw_relation_cached(rtype, role):
   721                 if self.cw_relation_cached(rtype, role):
   720                     continue
   722                     continue