equal
deleted
inserted
replaced
779 """ |
779 """ |
780 try: |
780 try: |
781 return self._cw_relation_cache(rtype, role, entities, limit) |
781 return self._cw_relation_cache(rtype, role, entities, limit) |
782 except KeyError: |
782 except KeyError: |
783 pass |
783 pass |
784 assert self.has_eid() |
784 if not self.has_eid(): |
|
785 if entities: |
|
786 return [] |
|
787 return self.empty_rset() |
785 rql = self.cw_related_rql(rtype, role) |
788 rql = self.cw_related_rql(rtype, role) |
786 rset = self._cw.execute(rql, {'x': self.eid}) |
789 rset = self._cw.execute(rql, {'x': self.eid}) |
787 self.cw_set_relation_cache(rtype, role, rset) |
790 self.cw_set_relation_cache(rtype, role, rset) |
788 return self.related(rtype, role, limit, entities) |
791 return self.related(rtype, role, limit, entities) |
789 |
792 |