1305 |
1305 |
1306 # deprecated stuff ######################################################### |
1306 # deprecated stuff ######################################################### |
1307 |
1307 |
1308 @deprecated('[3.16] use cw_set() instead of set_attributes()') |
1308 @deprecated('[3.16] use cw_set() instead of set_attributes()') |
1309 def set_attributes(self, **kwargs): # XXX cw_set_attributes |
1309 def set_attributes(self, **kwargs): # XXX cw_set_attributes |
1310 self.cw_set(**kwargs) |
1310 if kwargs: |
|
1311 self.cw_set(**kwargs) |
1311 |
1312 |
1312 @deprecated('[3.16] use cw_set() instead of set_relations()') |
1313 @deprecated('[3.16] use cw_set() instead of set_relations()') |
1313 def set_relations(self, **kwargs): # XXX cw_set_relations |
1314 def set_relations(self, **kwargs): # XXX cw_set_relations |
1314 """add relations to the given object. To set a relation where this entity |
1315 """add relations to the given object. To set a relation where this entity |
1315 is the object of the relation, use 'reverse_'<relation> as argument name. |
1316 is the object of the relation, use 'reverse_'<relation> as argument name. |
1316 |
1317 |
1317 Values may be an entity or eid, a list of entities or eids, or None |
1318 Values may be an entity or eid, a list of entities or eids, or None |
1318 (meaning that all relations of the given type from or to this object |
1319 (meaning that all relations of the given type from or to this object |
1319 should be deleted). |
1320 should be deleted). |
1320 """ |
1321 """ |
1321 self.cw_set(**kwargs) |
1322 if kwargs: |
|
1323 self.cw_set(**kwargs) |
1322 |
1324 |
1323 @deprecated('[3.13] use entity.cw_clear_all_caches()') |
1325 @deprecated('[3.13] use entity.cw_clear_all_caches()') |
1324 def clear_all_caches(self): |
1326 def clear_all_caches(self): |
1325 return self.cw_clear_all_caches() |
1327 return self.cw_clear_all_caches() |
1326 |
1328 |