use .cw_rset instead of rset on appobject classes
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 23 Sep 2009 09:34:10 +0200
changeset 3379 9192ba07890d
parent 3378 2f25f701301d
child 3380 3be33dc83d8b
use .cw_rset instead of rset on appobject classes
rset.py
server/repository.py
server/session.py
--- a/rset.py	Wed Sep 23 09:33:02 2009 +0200
+++ b/rset.py	Wed Sep 23 09:34:10 2009 +0200
@@ -322,7 +322,7 @@
             # we also have to fix/remove from the request entity cache entities
             # which get a wrong rset reference by this limit call
             for entity in self.req.cached_entities():
-                if entity.rset is self:
+                if entity.cw_rset is self:
                     if offset <= entity.row < stop:
                         entity.row = entity.row - offset
                     else:
@@ -425,7 +425,7 @@
         except KeyError:
             pass
         else:
-            if entity.rset is None:
+            if entity.cw_rset is None:
                 # entity has no rset set, this means entity has been created by
                 # the querier (req is a repository session) and so jas no rset
                 # info. Add it.
--- a/server/repository.py	Wed Sep 23 09:33:02 2009 +0200
+++ b/server/repository.py	Wed Sep 23 09:34:10 2009 +0200
@@ -536,7 +536,7 @@
         finally:
             session.close()
         session = Session(user, self, cnxprops)
-        user._cw = user.rset.req = session
+        user._cw = user.cw_rset.req = session
         user.clear_related_cache()
         self._sessions[session.id] = session
         self.info('opened %s', session)
--- a/server/session.py	Wed Sep 23 09:33:02 2009 +0200
+++ b/server/session.py	Wed Sep 23 09:34:10 2009 +0200
@@ -163,7 +163,7 @@
                 rset.description = list(rset.description)
             rset.description.append([self.describe(targeteid)[0]])
             targetentity = self.entity_from_eid(targeteid)
-            if targetentity.rset is None:
+            if targetentity.cw_rset is None:
                 targetentity.cw_rset = rset
                 targetentity.cw_row = rset.rowcount
                 targetentity.cw_col = 0