On Jul 28, 2011, at 4:23 PM, neurino wrote: > I need a Single Table Inheritance where the `type` column already > exists and is a foreign key - `id_type` - to `types` table. > > My concern is I only need to map to two different classes: > > - Foo for `polymorphic_identity=FOO_ID_TYPE` > - Bar for all other `id_type`s > > Is there a way I can accomplish this with two mappings?
we're working on easily allowing column_property() as a discriminator if you want to make a CASE statement. right now its tedious as per the example at http://www.sqlalchemy.org/trac/ticket/2227 (note second example is single table, polymorphic_on needs to be on all subclasses at the moment) -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.