Matthieu wrote:
>
> On Jun 27, 4:18 pm, Michael Bayer <[email protected]> wrote:
>> Basically foreign_keys and remote_side never have to be set unless the  
>> error messages tell you to.  In this case it told you to set  
>> "remote_side" and it was a simple misunderstanding.
>
> Thanks a lot Michael, i've included your modifications and it now
> works perfectly.
>
> I must confess that i don't really understand when this kind of
> specific relation options are mandatory and when they are not. Is it
> documented somewhere?

Its documented in the API docs for relation().   the need for remote_side
on the manytoone side is documented in the section on "self referential
relations", although the self-referential nature of an inheritance scheme
like you have is a little harder to spot.   Most people learn about these
flags from the error messages though, which are intended to act as a
"guided setup" for more complex relationships, and that is why those
messages and the checks for them are very carefully constructed and
tested.



> >
>


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