Jonathan Ellis ([EMAIL PROTECTED]):
> On 7/29/06, POX <[EMAIL PROTECTED]> wrote:
> >Why undermentioned code will not work with SA 0.2.6 anymore?
> >sqlalchemy.exceptions.ArgumentError: Class '<class '__main__.Bar'>'
> >already has a primary mapper defined.  Use is_primary=True to assign a new
> >primary mapper to the class, or use non_primary=True to create a non primary
> >Mapper
> 
> 
> So, creating two instances of Foo tries to assign a mapper to Bar twice
> since the mapper assignment is in Foo's constructor.

Indeed. I've just added "is_primary=True" to all primary mappers and it
works fine now. I was confused because it worked with 0.2.5 even without
"is_primary=True".

-- 
-=[     Piotr Ozarowski     ]=-
-=[ http://www.ozarowski.pl ]=-

Attachment: pgpVGpFvIBSSM.pgp
Description: PGP signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to