On Apr 2, 2012, at 8:39 PM, Robert Rollins wrote:

> However, I didn't notice until some time later that there's a serious
> bug in my ForeignKeyConstraint definition: the 'refcolumns' argument
> isn't referring to columns within the same table.  Rather than
> ['account.account_name', 'contact.id'], it should have been
> ['account_synced_contact.account_name',
> 'account_synced_contact.contact_id'].
> 
> Considering that the docs for refcolumns specifically state that "The
> columns must all be located within the same Table," I believe that
> SQLAlchemy should have thrown an exception for *that*, rather than for
> it being unable to figure out the primaryjoin condition.
> 
> I figure that the reason it didn't throw an exception is because I
> *have* defined an 'account' table with a pk called 'account_id', and a
> 'contact' table with an 'id' column. So SQLAlchemy may have found
> those columns and figured it was OK.

sure that's something that could be tested for, 
http://www.sqlalchemy.org/trac/ticket/2455 is added.



> 
> -- 
> 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 
> sqlalchemy+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sqlalchemy?hl=en.
> 

-- 
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 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to