entity.py
branchstable
changeset 9277 c964d8cf6efc
parent 9188 0677e03077fb
child 9283 5f2c5eb1a820
child 9310 80c58c35145f
equal deleted inserted replaced
9276:ae3fd6f8da76 9277:c964d8cf6efc
  1319 
  1319 
  1320     # deprecated stuff #########################################################
  1320     # deprecated stuff #########################################################
  1321 
  1321 
  1322     @deprecated('[3.16] use cw_set() instead of set_attributes()')
  1322     @deprecated('[3.16] use cw_set() instead of set_attributes()')
  1323     def set_attributes(self, **kwargs): # XXX cw_set_attributes
  1323     def set_attributes(self, **kwargs): # XXX cw_set_attributes
  1324         self.cw_set(**kwargs)
  1324         if kwargs:
       
  1325             self.cw_set(**kwargs)
  1325 
  1326 
  1326     @deprecated('[3.16] use cw_set() instead of set_relations()')
  1327     @deprecated('[3.16] use cw_set() instead of set_relations()')
  1327     def set_relations(self, **kwargs): # XXX cw_set_relations
  1328     def set_relations(self, **kwargs): # XXX cw_set_relations
  1328         """add relations to the given object. To set a relation where this entity
  1329         """add relations to the given object. To set a relation where this entity
  1329         is the object of the relation, use 'reverse_'<relation> as argument name.
  1330         is the object of the relation, use 'reverse_'<relation> as argument name.
  1330 
  1331 
  1331         Values may be an entity or eid, a list of entities or eids, or None
  1332         Values may be an entity or eid, a list of entities or eids, or None
  1332         (meaning that all relations of the given type from or to this object
  1333         (meaning that all relations of the given type from or to this object
  1333         should be deleted).
  1334         should be deleted).
  1334         """
  1335         """
  1335         self.cw_set(**kwargs)
  1336         if kwargs:
       
  1337             self.cw_set(**kwargs)
  1336 
  1338 
  1337     @deprecated('[3.13] use entity.cw_clear_all_caches()')
  1339     @deprecated('[3.13] use entity.cw_clear_all_caches()')
  1338     def clear_all_caches(self):
  1340     def clear_all_caches(self):
  1339         return self.cw_clear_all_caches()
  1341         return self.cw_clear_all_caches()
  1340 
  1342