OK Guys, solved using a native SQL query SELECT * FROM prod_productcategory pc JOIN prod_productcategories pcs ON pc.id = pcs.productCategoryId JOIN prod_product p ON pcs.productId = p.id AND p.productBrandId = :productBrandId;
On Sun, Jun 13, 2010 at 5:57 AM, ubahn <[email protected]> wrote: > Hi all, > > I have the following model: > > Each Product is linked with a ProductBrand > Each Product has a HasAndBelongsToMany relationship with > ProductCategory > > and what I`m trying to retrieve is a list of product categories for a > given product brand if there are products linked with that brand > > Can someone give me a hand on this one .... > > Thanks > > -- You received this message because you are subscribed to the Google Groups "Castle Project Users" 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/castle-project-users?hl=en.
