Re: [Sqlalchemy-users] problem with primary mapper

2006-07-29 Thread Michael Bayer
youre only allowed to define one primary mapper per class. by having assign_mapper in the constructor of a class, creating a new mapper for the Bar class which is in a static context, it creates a new mapper for the Bar class each time Foo's __init__ is called; all calls to this after the first w

Re: [Sqlalchemy-users] problem with primary mapper

2006-07-29 Thread POX
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 '' > >already has a primary mapper defined. Use is_primary=True to assign a new > >primary mapper to the cl

Re: [Sqlalchemy-users] problem with primary mapper

2006-07-29 Thread Jonathan Ellis
On 7/29/06, POX <[EMAIL PROTECTED]> wrote: Hi,Why undermentioned code will not work with SA 0.2.6 anymore?sqlalchemy.exceptions.ArgumentError: Class '' 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 pri

[Sqlalchemy-users] problem with primary mapper

2006-07-29 Thread POX
Hi, Why undermentioned code will not work with SA 0.2.6 anymore? After rinning: | #!/usr/bin/python | | from sqlalchemy import * | from sqlalchemy.mods.threadlocal import assign_mapper | | class Foo(object): | class Bar(object): | pass | def __init__(self, url): |