[z3-checkins] r18701 - z3/sqlos/trunk

andres at codespeak.net andres at codespeak.net
Mon Oct 17 10:39:47 CEST 2005


Author: andres
Date: Mon Oct 17 10:39:47 2005
New Revision: 18701

Modified:
   z3/sqlos/trunk/_sqlos.py
Log:
Changed _attribute to .sqlmeta style.

Modified: z3/sqlos/trunk/_sqlos.py
==============================================================================
--- z3/sqlos/trunk/_sqlos.py	(original)
+++ z3/sqlos/trunk/_sqlos.py	Mon Oct 17 10:39:47 2005
@@ -22,9 +22,10 @@
     boundaries.
     """
     implements(ISQLObject)
-
     _connection = ConnectionDescriptor()
-    _lazyUpdate = True
+    
+    class sqlmeta:
+        lazyUpdate = True
 
     def _set_dirty(self, value):
         if value:
@@ -43,12 +44,12 @@
 
     dirty = property(_get_dirty, _set_dirty)
 
-    def get(cls, id, connection=None, selectResults=None):
+    def get(self, id, connection=None, selectResults=None):
         # While interacting with zope, we may end up having
         # objects in the cache that have a __parent__ set.
         # This may be confusing when expect to get a object
         # which has no __parent__ and thats not what you get.
-        val = super(SQLOS, cls).get(id, connection=connection,
+        val = super(SQLOS, self).get(id, connection=connection,
                                     selectResults=selectResults)
         if getattr(val, '__parent__', None) is not None:
             val.__parent__ = None
@@ -59,8 +60,8 @@
     def __repr__(self):
         return '<%s at 0x%x>' % (self.__class__.__name__, id(self))
 
-    def setConnection(cls, connection):
+    def setConnection(self, connection):
         if connection is not None:
-            cls._connection = connection
+            self._connection = connection
 
     setConnection = classmethod(setConnection)


More information about the z3-checkins mailing list