]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
(no commit message)
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 7 Sep 2005 09:33:32 +0000 (09:33 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 7 Sep 2005 09:33:32 +0000 (09:33 +0000)
test/mapper.py

index 6ace8638d30786c9c4c40f7b7d66b8342d763f89..207cb540576fe96ee2754263dacc05fcc6618d59 100644 (file)
@@ -172,6 +172,14 @@ class EagerTest(AssertMixin):
         l = m.select()
         print repr(l)
 
+    def testonetoone(self):
+        m = mapper(User, users, properties = dict(
+            address = relation(Address, addresses, lazy = False, uselist = False)
+        ))
+        l = m.select(users.c.user_id == 7)
+        print repr(l)
+        print repr(l[0].address)
+
     def testwithrepeat(self):
         """tests a one-to-many eager load where we also query on joined criterion, where the joined
         criterion is using the same tables that are used within the eager load.  the mapper must insure that the