entity.py
changeset 8655 ab57000bff7b
parent 8621 038d67f42061
parent 8651 353bbd17a8b6
child 8660 aa865f3be80d
equal deleted inserted replaced
8654:7021bba2dcf2 8655:ab57000bff7b
   577 
   577 
   578     def __json_encode__(self):
   578     def __json_encode__(self):
   579         """custom json dumps hook to dump the entity's eid
   579         """custom json dumps hook to dump the entity's eid
   580         which is not part of dict structure itself
   580         which is not part of dict structure itself
   581         """
   581         """
       
   582         self.complete()
   582         dumpable = self.cw_attr_cache.copy()
   583         dumpable = self.cw_attr_cache.copy()
   583         dumpable['eid'] = self.eid
   584         dumpable['eid'] = self.eid
       
   585         dumpable['__cwetype__'] = self.__regid__
   584         return dumpable
   586         return dumpable
   585 
   587 
   586     def cw_adapt_to(self, interface):
   588     def cw_adapt_to(self, interface):
   587         """return an adapter the entity to the given interface name.
   589         """return an adapter the entity to the given interface name.
   588 
   590