mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-06-05 15:23:48 -04:00
- Fixed a recursive pickling issue in serializer, triggered
by an EXISTS or other embedded FROM construct.
This commit is contained in:
@@ -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
|
||||
======
|
||||
|
||||
|
||||
@@ -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).
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user