You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Nick Olson <ni...@vitaminlife.com> on 2006/08/17 00:42:46 UTC

Joins in the Entity delegator?

I have been trying to modify the makeCategoryFeatureLists function in
org.ofbiz.product.feature.ParametricSearch to only return the features
that actually are used in the Category specified, but I'm not sure what
the best way to go about it is.

Is there a way to get the Entity delegator to return a list of all the
features that are returned by this SQL query?

select DISTINCT pf.product_feature_id
FROM product_feature AS pf
LEFT JOIN product_feature_appl AS pfa ON pfa.product_feature_id =
pf.product_feature_id
LEFT JOIN product_category_member AS pcm ON pcm.product_id = pfa.product_id
WHERE pcm.product_category_id = 'Category'

Thanks,
-Nick


Re: Joins in the Entity delegator?

Posted by Si Chen <si...@opensourcestrategies.com>.
Use the view-entity.  Check the entity engine docs.

Si


On Aug 16, 2006, at 3:42 PM, Nick Olson wrote:

> I have been trying to modify the makeCategoryFeatureLists function in
> org.ofbiz.product.feature.ParametricSearch to only return the features
> that actually are used in the Category specified, but I'm not sure  
> what
> the best way to go about it is.
>
> Is there a way to get the Entity delegator to return a list of all the
> features that are returned by this SQL query?
>
> select DISTINCT pf.product_feature_id
> FROM product_feature AS pf
> LEFT JOIN product_feature_appl AS pfa ON pfa.product_feature_id =
> pf.product_feature_id
> LEFT JOIN product_category_member AS pcm ON pcm.product_id =  
> pfa.product_id
> WHERE pcm.product_category_id = 'Category'
>
> Thanks,
> -Nick