Joins in the Entity delegator?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Joins in the Entity delegator?

Nick Olson
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

Reply | Threaded
Open this post in threaded view
|

Re: Joins in the Entity delegator?

Si Chen-2
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