When doing a select() on a database, the 'q' member is used to access individual columns for comparison.

How is this done for relations?

Let's say I have this relation:

class Page(SQLObject):
    name        = StringCol(alternateID=True)
    categories  = RelatedJoin('Category')

And I want to select all pages that have the category 'news'

Page.select(Page.q.categories == <whatever>)

That query will raise:
       KeyError: 'categories'

I'm going bleary-eyed trying to figure this one out ...

--
"Things fall apart. The Center cannot hold."
                  - Life as a QA geek, in a nutshell.

Best,

    Jeff

Reply via email to