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

2010-08-05 Thread Michael Bayer
On Aug 5, 2010, at 5:06 PM, Zippy P wrote: > I have the following code: > > from objects import * > > class Device(Base): > __tablename__="testdev" > devtype = Column(Unicode(20), primary_key = True) > __mapper_args__ = {'polymorphic_on': devtype} > mac = Column(Unicode(

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

2010-08-05 Thread Zippy P
I have the following code: 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 = True) switch_mac = Column(Unicode(128), ForeignKey(mac)) switch