#1412: SQLObject Model Breaks Catwalk
----------------------------------------------+-----------------------------
Reporter: Cerin | Owner: chrisz
Type: defect | Status: closed
Priority: normal | Milestone: 1.0.x bugfix
Component: Toolbox.Catwalk | Version: 1.0.4b1
Severity: normal | Resolution: fixed
Keywords: needs patch, CatWalk, joinColumn |
----------------------------------------------+-----------------------------
Changes (by chrisz):
* status: new => closed
* resolution: => fixed
Comment:
This is actually not a bug in Catwalk, but the result of a naming error in
these models coupled with a deficiency of SQLObject that does not raise
this naming error earlier: If you have a `MultipleJoin` like above, and
you do not specify a `joinColumn` argument, then the join column is
assumed to be called after the table with the `MultipleJoin`.
The naming error in the attached "modelbug" was that the foreign key was
named "user", while the table name was actually "tg_user". The naming
error in comment 3 was that the foreign key was called "tasktype" while
the table name was "task_type".
Everything works as expected if you rename the foreign key to match the
table name, or if you add a `joinColumn` argument to the `MultipleJoin`
call specifying the different key name.
So nothing really needed to be fixed in Catwalk; but I have added a better
error message for such naming problems in r6808.
--
Ticket URL: <http://trac.turbogears.org/ticket/1412#comment:9>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---