On Jul 15, 2007, at 3:03 PM, [EMAIL PROTECTED] wrote:

>
>>     - Using polymorphic, joined-table inheritance ?  Forget about
>> polymorphic_union(), just join all the tables together using
>> outerjoin(). In 0.4, even the select_table argument becomes
>> optional.
> i am not sure if i got this right (a month already). A-B-C works, yes.
> But just explain to stupid me how would to do it for this simple tree:
> A, B(A), C(B), D(A). (or anything else having at least 2 siblings
> subclasses). All nodes have instances.

a.outerjoin(b).outerjoin(c).outerjoin(d, a.c.id==d.c.id) ?

>
> This new "joined-table inheritance" term, is somewhat better
> than "multiple table inh..", or as i picked it up, just "table
> inheritance".

its the proper term

>
> Also, in the docs, u still talk about polymorphical concrete
> inheritance, while it does not really work. i mean, haveing some
> engineer.id=2 and some other manager.id=2 would break it... there
> would be 2 rows of id=2. Unless u know how to fix it.

well technically i think thered be a "type" column on each table too  
which you might make as part of a composite primary key.   that way  
PKs are unique within the union of all three tables.  we should make  
that work and fix the doc for it, but also i think youre the only  
person to ever even attempt concrete inheritance too :)





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to