]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
a comment indicating why we can't raise an error for relation(Foo, uselist=False...
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 26 May 2008 18:35:24 +0000 (18:35 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 26 May 2008 18:35:24 +0000 (18:35 +0000)
test/orm/unitofwork.py

index 649754601c4f9d5933f41bfed792248b3b26e9d1..7beafb58f5dd21aa3e54652f22cfaa26346081b5 100644 (file)
@@ -1854,7 +1854,9 @@ class ManyToManyTest(_fixtures.FixtureTest):
                  keyword=relation(mapper(Keyword, keywords, non_primary=True),
                                   lazy=False,
                                   uselist=False,
-                                  order_by=keywords.c.name)))
+                                  order_by=keywords.c.name      # note here is a valid place where order_by can be used
+                                  )))                           # on a scalar relation(); to determine eager ordering of
+                                                                # the parent object within its collection.
 
         mapper(Item, items, properties=dict(
             keywords=relation(IKAssociation, lazy=False)))