[sqlalchemy] Re: polymorphism without extra table

2008-06-10 Thread ml
that's it! great, thanks! Michael Bayer napsal(a): > > On Jun 10, 2008, at 8:34 AM, ml wrote: > >> So as you can see the table "articles" is quite redundant because it >> has >> only the primary key column but I didn't find any other way to select >> articles directly from the table "virtual

[sqlalchemy] Re: polymorphism without extra table

2008-06-10 Thread Michael Bayer
On Jun 10, 2008, at 8:34 AM, ml wrote: > > So as you can see the table "articles" is quite redundant because it > has > only the primary key column but I didn't find any other way to select > articles directly from the table "virtual_items" according to the > column > "kind" without joining

[sqlalchemy] Re: polymorphism without extra table

2008-06-10 Thread ml
I have more stuff placed above the "virtual_*" like photogalleries, specifications, ... So I'd like some neat layered code design - class tripplets for all purposes (ArticlesCategory, Article, ArticleProposal), (PhotosCategory, Photo, PhotoProposal), ... I want to call sess.query(Articles)... a

[sqlalchemy] Re: polymorphism without extra table

2008-06-10 Thread az
and you mappers look like? why u need to inherit articles at all then? just use the base.. On Tuesday 10 June 2008 15:34:21 ml wrote: > Hi! > > I have following situation: I have 3 tables which stand as a base > for other stuff: > > table_virtual_categories = Table("virtual_categories", meta, >