server/repository.py
changeset 2667 c8aa82538d8e
parent 2665 0c6281487f90
child 2708 60d728bdcba5
equal deleted inserted replaced
2666:c6c832d32936 2667:c8aa82538d8e
  1036                 session.update_rel_cache_add(entity.eid, attr, value)
  1036                 session.update_rel_cache_add(entity.eid, attr, value)
  1037                 self.hm.call_hooks('after_add_relation', attr, session,
  1037                 self.hm.call_hooks('after_add_relation', attr, session,
  1038                                     entity.eid, attr, value)
  1038                                     entity.eid, attr, value)
  1039         return entity.eid
  1039         return entity.eid
  1040 
  1040 
  1041     def glob_update_entity(self, session, entity):
  1041     def glob_update_entity(self, session, entity, edited_attributes):
  1042         """replace an entity in the repository
  1042         """replace an entity in the repository
  1043         the type and the eid of an entity must not be changed
  1043         the type and the eid of an entity must not be changed
  1044         """
  1044         """
  1045         etype = str(entity.e_schema)
  1045         etype = str(entity.e_schema)
  1046         if server.DEBUG & server.DBG_REPO:
  1046         if server.DEBUG & server.DBG_REPO:
  1047             print 'UPDATE entity', etype, entity.eid, dict(entity)
  1047             print 'UPDATE entity', etype, entity.eid, \
       
  1048                   dict(entity), edited_attributes
       
  1049         entity.edited_attributes = edited_attributes
  1048         entity.check()
  1050         entity.check()
  1049         eschema = entity.e_schema
  1051         eschema = entity.e_schema
  1050         session.set_entity_cache(entity)
  1052         session.set_entity_cache(entity)
  1051         only_inline_rels, need_fti_update = True, False
  1053         only_inline_rels, need_fti_update = True, False
  1052         relations = []
  1054         relations = []