From: Ian W. <ven...@gm...> - 2006-08-03 20:52:37
|
Hello SQLObject and friends, If I have the two classes: class Product(InheritableSQLObject): name = StringCol(length=255, alternateID=True) description = StringCol() archived = BoolCol(default=False) options = RelatedJoin('ProductOption', orderBy="name") class ProductOption(SQLObject): name = StringCol(alternateID=True, length=255) archived = BoolCol(default=False) products = RelatedJoin('Product', orderBy="name") I want to get all products that are not archived of a given product option. So how can I emulate this using a SQLBuilder and preferably without mention of product_product_option? SELECT * FROM product, product_product_option WHERE product.id = product_product_option.product_id AND product_product_option.product_option_id = 2 AND product.archived = 0; Thanks in advance, -Ian |