Hi!

You can use SQLRelatedJoin, it will return a sqlresult object to you,
then you can use the filter method to do what you want:


Food(SQLObject):
        name = StringCol()
        brand = StringCol(default=None)
        categories = SQLRelatedJoin("Category")

Category(SQLObject):
        name = StringCol()
        description = StringCol()
        foods = SQLRelatedJoin("Food")

category = Category.get(id)
foods = category.foods.filter(Food.q.brand=="Gourme")
for food in foods:
     print food

--
Michel Thadeu Sabchuk
Curitiba - Brasil


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to