summaryrefslogtreecommitdiff
path: root/test/orm/query.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-11-06 23:07:47 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-11-06 23:07:47 +0000
commitc3352e5542001d1a5614af260d74ad8757a59f26 (patch)
tree109a2af43b80ad3b244a3d1d8a395435d37eff3d /test/orm/query.py
parent84003a8d402c5d7539cf2d53f4061cde62d04413 (diff)
downloadsqlalchemy-c3352e5542001d1a5614af260d74ad8757a59f26.tar.gz
- Fixed bug in Query involving order_by() in conjunction with
multiple aliases of the same class (will add tests in [ticket:1218]) - Added a new extension sqlalchemy.ext.serializer. Provides Serializer/Deserializer "classes" which mirror Pickle/Unpickle, as well as dumps() and loads(). This serializer implements an "external object" pickler which keeps key context-sensitive objects, including engines, sessions, metadata, Tables/Columns, and mappers, outside of the pickle stream, and can later restore the pickle using any engine/metadata/session provider. This is used not for pickling regular object instances, which are pickleable without any special logic, but for pickling expression objects and full Query objects, such that all mapper/engine/session dependencies can be restored at unpickle time.
Diffstat (limited to 'test/orm/query.py')
-rw-r--r--test/orm/query.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/orm/query.py b/test/orm/query.py
index e50cacc86..b63c12f09 100644
--- a/test/orm/query.py
+++ b/test/orm/query.py
@@ -1028,7 +1028,7 @@ class JoinTest(QueryTest):
q = sess.query(User)
AdAlias = aliased(Address)
q = q.add_entity(AdAlias).select_from(outerjoin(User, AdAlias))
- l = q.order_by(User.id, Address.id).all()
+ l = q.order_by(User.id, AdAlias.id).all()
self.assertEquals(l, expected)
sess.clear()
@@ -1705,7 +1705,7 @@ class MixedEntitiesTest(QueryTest):
q = sess.query(User)
adalias = addresses.alias('adalias')
q = q.add_entity(Address, alias=adalias).select_from(users.outerjoin(adalias))
- l = q.order_by(User.id, Address.id).all()
+ l = q.order_by(User.id, adalias.c.id).all()
assert l == expected
sess.clear()