hi -
can you attach a test case ? while I went thru and created my own as
below, and it did reveal a small bug in mapper.get() which I just
fixed, i cant reproduce your error; the script below creates three
mappers in an inheritance chain, saves an object of the child type,
and retrieves it back.
from sqlalchemy import *
engine = create_engine('sqlite://', echo=True)
class A(object):pass
class B(A):pass
class C(B):pass
a = Table('a', engine,
Column('a_id', Integer, primary_key=True),
Column('adata', String(20)),
)
b = Table('b', engine,
Column('b_id', Integer, primary_key=True),
Column('a_id', Integer, ForeignKey('a.a_id')),
Column('bdata', String(20)),
)
c = Table('c', engine,
Column('c_id', Integer, primary_key=True),
Column('b_id', Integer, ForeignKey('b.b_id')),
Column('cdata', String(20)),
)
a.create()
b.create()
c.create()
m1 = mapper(A, a)
m2 = mapper(B, b, inherits = m1)
m3 = mapper(C, c, inherits= m2)
myc = C()
myc.cdata = "c's data"
myc.bdata = "b's data"
myc.adata = "a's data"
objectstore.commit()
print myc._instance_key
objectstore.clear()
# just fixed a bug in mapper for this
#myc = m3.get(1, 1, 1)
l = m3.select()
print l
On Feb 24, 2006, at 9:25 AM, [EMAIL PROTECTED] wrote:
Hi,
I found that trying to inherit from mappers that themselves inherit
from a
mapper produces the error: "AttributeError: 'ColumnImpl' object has no
attribute 'references'".
Kind Regards,
Florian
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the
live webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?
cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users