- Fixed a recursive pickling issue in serializer, triggered

by an EXISTS or other embedded FROM construct.
This commit is contained in:
Mike Bayer
2009-02-17 12:56:48 +00:00
parent e329fb3178
commit 689a144a71
3 changed files with 23 additions and 6 deletions
+11 -6
View File
@@ -54,11 +54,6 @@ CHANGES
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
@@ -85,7 +80,17 @@ CHANGES
- 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
======
+6
View File
@@ -2697,6 +2697,12 @@ class _FromGrouping(FromClause):
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).
+6
View File
@@ -124,6 +124,12 @@ class SerializeTest(testing.ORMTest):
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()