On Jul 13, 2007, at 3:50 AM, [EMAIL PROTECTED] wrote:

>
> i played a bit with your thing...
> how do u expect the id column to appear in the Employee actualy?
> do u expect to get the base person' one, or the child one? or both?
> looking from the child, yes, the child one will obscure the parent
> one, but from the parent.. u'll never get the child one.


yeah actually, playing with this some more, hes right.   even with  
the "fix" i put in, your mapper still is munging the two distinct  
"id" values into one column attribute, "id", which still creates  
problems.  you still have to:

a. name the columns differently
b. join them together on a foreign key
c. name them distinctly on your mapper:

person_mapper = mapper(Person, person_table)
mapper(Employee, employee_table, inherits=person_mapper, properties= 
{'pid':person_table.c.id, 'eid':employee_table.c.id})

since the logical mapping of the object is a join between the two  
tables, those two columns conflict in the columns clause of such a join.

this is a thorny issue which probably deserves a little bit of  
documentation.



--~--~---------~--~----~------------~-------~--~----~
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