Well, not by exactly using SQLAlchemy's provided implementation of
joined table inheritance, because it uses a discriminator column that
only holds a single value.  Of course it is possible to create more
complex inheritance structures on your own, just without some of the
polymorphic-loading work so generously pre-configured in SA's joined-
table system.

One of my own projects makes use of polymorphic multiple-inheritance
(multiple 'roles' for certain objects).  What i do is instead of a
discriminator column in the parent table, I have a secondary
association table that establishes a many-to-many relationship between
objects and [roles | types | whatever classifications I'm working
with].  If I want fancy loading behavior I have to write some joins,
but in most cases I'm willing to have my own code lazy-load attributes
as needed.


On Nov 5, 9:15 am, Mark Erbaugh <m...@microenh.com> wrote:
> Please refer to the Joined Table Inheritance Section under declarative.ext 
> (I'm using SA 0.5.8).
>
> Is is possible to create a Person who is both an Engineer and a Manager using 
> joined table inheritance? IOW, both Manager and Engineer would link to the 
> same row in Person.
>
> Thanks,
> Mark

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@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.

Reply via email to