Commits

Mike Bayer committed 06fc0cb

- Fixed a recursive pickling issue in serializer, triggered
by an EXISTS or other embedded FROM construct.

Comments (0)

Files changed (3)

        been loaded from the database.   Helps with the creation of 
        homegrown collection loaders and such.
 
-     - Declarative figures out joined-table inheritance primary join
-       condition even if "inherits" mapper argument is given 
-       explicitly.  Allows mixins to be used with joined table
-       inheritance.
-       
 - sql
     - Fixed missing _label attribute on Function object, others
       when used in a select() with use_labels (such as when used
 
 - mssql
     - Preliminary support for pymssql 1.0.1
-    
+
+- extensions
+
+    - Fixed a recursive pickling issue in serializer, triggered
+      by an EXISTS or other embedded FROM construct.
+
+    - Declarative figures out joined-table inheritance primary join
+      condition even if "inherits" mapper argument is given 
+      explicitly.  Allows mixins to be used with joined table
+      inheritance.
+
 0.5.2
 ======
 

lib/sqlalchemy/sql/expression.py

     def __getattr__(self, attr):
         return getattr(self.element, attr)
 
+    def __getstate__(self):
+        return {'element':self.element}
+
+    def __setstate__(self, state):
+        self.element = state['element']
+
 class _Label(ColumnElement):
     """Represents a column label (AS).
 

test/ext/serializer.py

         q2 = serializer.loads(serializer.dumps(q), users.metadata, Session)
         
         eq_(list(q2.all()), [(u7, u8), (u7, u9), (u7, u10), (u8, u9), (u8, u10)])
+
+    def test_any(self):
+        r = User.addresses.any(Address.email=='x')
+        ser = serializer.dumps(r)
+        x = serializer.loads(ser, users.metadata)
+        eq_(str(r), str(x))
         
 if __name__ == '__main__':
     testing.main()