restore bw compat on Entity.related_rql
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 02 Jul 2010 17:49:23 +0200
changeset 5870 d3ec7c4bb373
parent 5869 8a129b3a5aff
child 5871 b21eb3e90a10
restore bw compat on Entity.related_rql
entity.py
--- a/entity.py	Fri Jul 02 15:26:59 2010 +0200
+++ b/entity.py	Fri Jul 02 17:49:23 2010 +0200
@@ -1099,6 +1099,11 @@
     def clear_related_cache(self, rtype=None, role=None):
         self.cw_clear_relation_cache(rtype, role)
 
+    @deprecated('[3.9] use entity.cw_related_rql(rtype, [role, [targettypes]])')
+    def related_rql(self, rtype, role='subject', targettypes=None):
+        return self.cw_related_rql(rtype, role, targettypes)
+
+
 # attribute and relation descriptors ##########################################
 
 class Attribute(object):