From: Mike Bayer Date: Sat, 3 Dec 2005 05:29:12 +0000 (+0000) Subject: moved eagermapper creation up to insure theres no mapper conflicts when creating... X-Git-Tag: rel_0_1_0~273 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d0bf6de0a3bfec095980404c07e78e1f7445fdf;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git moved eagermapper creation up to insure theres no mapper conflicts when creating/saving --- diff --git a/test/manytomany.py b/test/manytomany.py index cc521c9a89..e4b599d6b5 100644 --- a/test/manytomany.py +++ b/test/manytomany.py @@ -103,8 +103,12 @@ class ManyToManyTest(testbase.AssertMixin): ) Place.mapper.add_property('inputs', relation(Transition.mapper, place_output, lazy=True)) Place.mapper.add_property('outputs', relation(Transition.mapper, place_input, lazy=True)) - + Place.eagermapper = Place.mapper.options( + eagerload('inputs', selectalias='ip_alias'), + eagerload('outputs', selectalias='op_alias') + ) + t1 = Transition('transition1') t2 = Transition('transition2') t3 = Transition('transition3') @@ -122,10 +126,6 @@ class ManyToManyTest(testbase.AssertMixin): objectstore.commit() - Place.eagermapper = Place.mapper.options( - eagerload('inputs', selectalias='ip_alias'), - eagerload('outputs', selectalias='op_alias') - ) l = Place.eagermapper.select() print repr(l)