On Oct 21, 2008, at 9:41 AM, Marin wrote:

>
> I am using SA to map existing tables from my database. I have mapped
> the whole database without using any foreign_key argument for the
> mapper properties. After adding 3 new tables with corresponding
> foreign keys, SA is forcing me to add the foreign_key argument for the
> new mappings. Is there a reason why is it forcing me to do so?
> I just can't see the difference between the old and the new tables, or
> their corresponding mappings.


cant tell the reason without more specifics.  In general, it means  
that the primaryjoin condition you are sending does not contain  
columns with a ForeignKey object on them, so that SQLA can't determine  
which direction the reference is in.    If the Table object used in  
the primaryjoin does not have ForeignKey this would cause that.    If  
you're reflecting MySQL ISAM tables with autoload=True, you'd see this  
behavior (so perhaps you're missing an InnoDB?)

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to