server/session.py
changeset 2650 18aec79ec3a3
parent 2647 b0a2e779845c
child 2680 66472d85d548
--- a/server/session.py	Mon Aug 03 09:37:13 2009 +0200
+++ b/server/session.py	Mon Aug 03 10:50:57 2009 +0200
@@ -142,10 +142,6 @@
         """return the original parent session if any, else self"""
         return self
 
-    def etype_class(self, etype):
-        """return an entity class for the given entity type"""
-        return self.vreg.etype_class(etype)
-
     def system_sql(self, sql, args=None, rollback_on_failure=True):
         """return a sql cursor on the system database"""
         if not sql.split(None, 1)[0].upper() == 'SELECT':
@@ -555,6 +551,11 @@
             description.append(tuple(row_descr))
         return description
 
+    @deprecated("use vreg['etypes'].etype_class(etype)")
+    def etype_class(self, etype):
+        """return an entity class for the given entity type"""
+        return self.vreg['etypes'].etype_class(etype)
+
     @deprecated('use direct access to session.transaction_data')
     def query_data(self, key, default=None, setdefault=False, pop=False):
         if setdefault: