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

2011-08-23 Thread Mike Gilligan
That's exactly what I needed. Thanks again. On Aug 23, 7:28 am, Michael Bayer wrote: > here's a pastebin of it: > > http://pastebin.com/z8XWsv2e > > On Aug 16, 2011, at 7:42 PM, Michael Bayer wrote: > > > > > > > > > > > On Aug 16, 201

[sqlalchemy] Re: Querying specific class using String name of class

2011-08-23 Thread Mike Gilligan
`eval` should work. Something like this: session.query(eval('DNA')).all() On Aug 22, 12:08 pm, JPLaverdure wrote: > Hello, > > Is there a proper way to retrieve a class using its name other than going > through the _decl_class_registry dictionary of declarative_base ? > I'm using the Joined Tabl

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

2011-08-23 Thread Mike Gilligan
Thanks for the quick response Michael. Unfortunately, I had my email settings wrong and just now read your response. You stated you attached an example but I do not see one. Can you point me to it? On Aug 16, 4:42 pm, Michael Bayer wrote: > On Aug 16, 2011, at 5:37 PM, Mike Gilligan wr

[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