827 eid = self.system_source.create_eid(session) |
827 eid = self.system_source.create_eid(session) |
828 self._extid_cache[cachekey] = eid |
828 self._extid_cache[cachekey] = eid |
829 self._type_source_cache[eid] = (etype, source.uri, extid) |
829 self._type_source_cache[eid] = (etype, source.uri, extid) |
830 entity = source.before_entity_insertion(session, extid, etype, eid) |
830 entity = source.before_entity_insertion(session, extid, etype, eid) |
831 if source.should_call_hooks: |
831 if source.should_call_hooks: |
|
832 entity.edited_attributes = set(entity) |
832 self.hm.call_hooks('before_add_entity', session, entity=entity) |
833 self.hm.call_hooks('before_add_entity', session, entity=entity) |
833 # XXX call add_info with complete=False ? |
834 # XXX call add_info with complete=False ? |
834 self.add_info(session, entity, source, extid) |
835 self.add_info(session, entity, source, extid) |
835 source.after_entity_insertion(session, extid, entity) |
836 source.after_entity_insertion(session, extid, entity) |
836 if source.should_call_hooks: |
837 if source.should_call_hooks: |