478 # try to complete the entity if there are some additional columns |
478 # try to complete the entity if there are some additional columns |
479 if len(rowvalues) > 1: |
479 if len(rowvalues) > 1: |
480 eschema = entity.e_schema |
480 eschema = entity.e_schema |
481 eid_col, attr_cols, rel_cols = self._rset_structure(eschema, col) |
481 eid_col, attr_cols, rel_cols = self._rset_structure(eschema, col) |
482 entity.eid = rowvalues[eid_col] |
482 entity.eid = rowvalues[eid_col] |
483 for attr, col_idx in attr_cols.items(): |
483 for attr, col_idx in attr_cols.iteritems(): |
484 entity.cw_attr_cache[attr] = rowvalues[col_idx] |
484 entity.cw_attr_cache[attr] = rowvalues[col_idx] |
485 for (rtype, role), col_idx in rel_cols.items(): |
485 for (rtype, role), col_idx in rel_cols.iteritems(): |
486 value = rowvalues[col_idx] |
486 value = rowvalues[col_idx] |
487 if value is None: |
487 if value is None: |
488 if role == 'subject': |
488 if role == 'subject': |
489 rql = 'Any Y WHERE X %s Y, X eid %s' |
489 rql = 'Any Y WHERE X %s Y, X eid %s' |
490 else: |
490 else: |