From: Mike Bayer Date: Wed, 7 Sep 2005 09:33:32 +0000 (+0000) Subject: (no commit message) X-Git-Tag: rel_0_1_0~767 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e67a8684543a0aad7c847277d10729140d5743d;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git --- diff --git a/test/mapper.py b/test/mapper.py index 6ace8638d3..207cb54057 100644 --- a/test/mapper.py +++ b/test/mapper.py @@ -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