entity.py
branchstable
changeset 8651 353bbd17a8b6
parent 8472 444a8e25c940
child 8655 ab57000bff7b
child 8657 5ab6ec83d5ba
equal deleted inserted replaced
8650:9a6e80bfad9d 8651:353bbd17a8b6
   537 
   537 
   538     def __json_encode__(self):
   538     def __json_encode__(self):
   539         """custom json dumps hook to dump the entity's eid
   539         """custom json dumps hook to dump the entity's eid
   540         which is not part of dict structure itself
   540         which is not part of dict structure itself
   541         """
   541         """
       
   542         self.complete()
   542         dumpable = self.cw_attr_cache.copy()
   543         dumpable = self.cw_attr_cache.copy()
   543         dumpable['eid'] = self.eid
   544         dumpable['eid'] = self.eid
       
   545         dumpable['__cwetype__'] = self.__regid__
   544         return dumpable
   546         return dumpable
   545 
   547 
   546     def cw_adapt_to(self, interface):
   548     def cw_adapt_to(self, interface):
   547         """return an adapter the entity to the given interface name.
   549         """return an adapter the entity to the given interface name.
   548 
   550