[Sqlalchemy-tickets] [sqlalchemy] #2725: The sense foreign_keys parameter to orm.relationship is un
Brought to you by:
zzzeek
|
From: sqlalchemy <mi...@zz...> - 2013-05-09 19:06:46
|
#2725: The sense foreign_keys parameter to orm.relationship is unclear
---------------------------+-----------------------------------------
Reporter: amluto | Owner: zzzeek
Type: defect | Status: new
Priority: medium | Milestone:
Component: documentation | Severity: no triage selected yet
Keywords: | Progress State: awaiting triage
---------------------------+-----------------------------------------
I just spent several hours cursing at truly bizarre errors involving
circular dependencies and then, once I fixed those, bogus SQL queries
being generated. The problem is that the documentation for foreign_keys
does not indicate which ''side'' of the foreign key relationship is
supposed to be specified.
Something like:
foreign_keys - a list of columns which are to be used as “foreign key”
columns. These are the columns on the table that is constrained to
reference another table, not the columns being referenced.
would help a lot. (It's also unhelpful that all of the examples given are
rather arcane. A completely trivial example showing a normal ForeignKey
and the foreign_key and primaryjoin parameters that are implied would make
this much easier to follow.)
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2725>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|