[sqlalchemy] Re: now with code goodness: problems with single-table inheritance and column_properties?

2010-08-05 Thread SQLAlchemy User
On Aug 5, 3:11 pm, Michael Bayer wrote: > > Ultimately you're looking for a self-referential correlation here.   In SQL, > that always implies using aliases.   Your column_property needs to be against > aliased(PC) and not PC itself.     Thanks - that did the trick. I can't believe it was such

[sqlalchemy] Re: now with code goodness: problems with single-table inheritance and column_properties?

2010-08-05 Thread SQLAlchemy User
Trying again without tab indents. Hopefully the formatting works this time. from objects import * class Device(Base): __tablename__="testdev" devtype = Column(Unicode(20), primary_key = True) __mapper_args__ = {'polymorphic_on': devtype} mac = Column(Unicode(128), primary_key = Tr