So I figured this one out, posting my solution so that anyone else who
runs into might be able to solve it more quickly than I. Basically,
with the "related join" you need to add the extra definitions that
SQLObject is expecting. Thus, a model that looks like this:

class Item(SQLObject):
        name = StringCol(alternateID = True)
        description = StringCol()
        link = StringCol()
        categories = RelatedJoin('Category')

class Category(SQLObject):
        name = StringCol(alternateID = True)
        items = RelatedJoin('Item')

Needs to be changed so that it looks something like this instead:

class Item(SQLObject):
        name = StringCol(alternateID = True)
        description = StringCol()
        link = StringCol()
        categories = RelatedJoin('Category',
intermediateTable="category_join",
                         joinColumn="item_id",
otherColumn="category_id")

class Category(SQLObject):
        name = StringCol(alternateID = True)
        items = RelatedJoin('Item', intermediateTable="category_join",
                         joinColumn="category_id", otherColumn="id")


Then it will work correctly. The tutorials (20 minute wiki and
turbotunes) don't have their models built this way. I discovered this
after looking at the SQLObject documention and looking at the code for
fasttrack.

-QH-


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to