Collin L wrote:

I have see examples of RelatedJoins in which no named parameters were
specified.  I could only get a RelatedJoin to work when I specified
intermediateTable, joinColumn, otherColumn, and addRemoveName.  For
example:

class List(SQLObject):
    subscribers = RelatedJoin("User",
intermediateTable="favorite_lists",
                              joinColumn="list_id", otherColumn="user_id",
                              addRemoveName="Subscriber")

class User(SQLObject):
    favorite_lists =    RelatedJoin("List",
intermediateTable="favorite_lists",
                                    joinColumn="user_id", otherColumn="list_id",
                                    addRemoveName="FavoriteList")

Do I need to specify all these named parameters or are some of these
unnecessary?  How are the default determined?

Total speculation in the absence of any other response: List and User
are reserved words in Python and (some dialects of) SQL, case
sensitivity aside. It might be that some extra name-mangling is going
on behind the scenes which makes the default join settings fail.

It might also be helpful to know what actually happens when you try
without the explicit join parameters.

--
Ben Sizer


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to