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
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
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
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):
|
4 matches
Mail list logo