1593 self.hm.call_hooks('before_delete_relation', session, |
1593 self.hm.call_hooks('before_delete_relation', session, |
1594 eidfrom=subject, rtype=rtype, eidto=object) |
1594 eidfrom=subject, rtype=rtype, eidto=object) |
1595 source.delete_relation(session, subject, rtype, object) |
1595 source.delete_relation(session, subject, rtype, object) |
1596 rschema = self.schema.rschema(rtype) |
1596 rschema = self.schema.rschema(rtype) |
1597 session.update_rel_cache_del(subject, rtype, object, rschema.symmetric) |
1597 session.update_rel_cache_del(subject, rtype, object, rschema.symmetric) |
1598 if rschema.symmetric: |
|
1599 # on symmetric relation, we can't now in which sense it's |
|
1600 # stored so try to delete both |
|
1601 source.delete_relation(session, object, rtype, subject) |
|
1602 if source.should_call_hooks: |
1598 if source.should_call_hooks: |
1603 self.hm.call_hooks('after_delete_relation', session, |
1599 self.hm.call_hooks('after_delete_relation', session, |
1604 eidfrom=subject, rtype=rtype, eidto=object) |
1600 eidfrom=subject, rtype=rtype, eidto=object) |
1605 |
1601 |
1606 |
1602 |