Re: [sqlalchemy] Single Table Inheritance with mult-column keys

2012-08-24 Thread Rob
Hi Michael, That does exactly what I was after (and I've learned a little bit more about sqalchemy!) Thank you very much for your help. On Thursday, 23 August 2012 19:13:27 UTC+1, Michael Bayer wrote: On Aug 23, 2012, at 10:04 AM, Rob wrote: Hi Michael, I have a similar (but subtly

Re: [sqlalchemy] Single Table Inheritance with mult-column keys

2012-08-23 Thread Rob
Hi Michael, I have a similar (but subtly different) problem to this, trying to mix single- and joined-table inheritance. Essentially my model looks as follows: Product(Base) PhysicalProduct(Product) NonPhysicalProduct(Product) The Physical/NonPhysicalProduct use single table inheritance

Re: [sqlalchemy] Single Table Inheritance with mult-column keys

2011-08-23 Thread Michael Bayer
here's a pastebin of it: http://pastebin.com/z8XWsv2e On Aug 16, 2011, at 7:42 PM, Michael Bayer wrote: On Aug 16, 2011, at 5:37 PM, Mike Gilligan wrote: I have a single table that looks similar to the following: class Equipment(Base): type = Column(CHAR(1), primary_key=True)

[sqlalchemy] Single Table Inheritance with mult-column keys

2011-08-16 Thread Mike Gilligan
I have a single table that looks similar to the following: class Equipment(Base): type = Column(CHAR(1), primary_key=True) sub_type = Column(CHAR(1), primary_key=True) code = Column(CHAR(5), primary_key=True) For historical purposes, I cannot modify this table. I would like to setup

Re: [sqlalchemy] Single Table Inheritance with mult-column keys

2011-08-16 Thread Michael Bayer
On Aug 16, 2011, at 5:37 PM, Mike Gilligan wrote: I have a single table that looks similar to the following: class Equipment(Base): type = Column(CHAR(1), primary_key=True) sub_type = Column(CHAR(1), primary_key=True) code = Column(CHAR(5), primary_key=True) For