From 6d0bf6de0a3bfec095980404c07e78e1f7445fdf Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 3 Dec 2005 05:29:12 +0000 Subject: [PATCH] moved eagermapper creation up to insure theres no mapper conflicts when creating/saving --- test/manytomany.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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) -- 2.47.2