On Sun, 2006-19-11 at 20:00 +0100, Diez B. Roggisch wrote:
> iain duncan schrieb:
> > I looked through the SO docs for this, but well, it's a bit "terse"
> > shall we say.
> > 
> > I have a product table, a category table, and a many-to-many product
> > category table created by SO because of the related join clause in my
> > model. What I can't figure out how to do properly is select all the
> > products that have a category. ie:
> 
> Maybe I'm dense today, but why doesn't
> 
> category.products

It does, but I want to select the products based on filtering out
categories, as in a join. I assume this can be done somehow in one
statement, but the following does not work:

products = Product.selectBy(Product.q.categories == 1)

It gives me an error that Product has no attribute categories.

Thanks
Iain



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