Has anyone got something similar working in MySQL (with entity engine)?

On Sat, Apr 13, 2013 at 6:53 AM, Varun Bhansaly <[email protected]> wrote:

> A correction on the last portion - "I'm using OFBiz trunk and using
> delegator.find(...) and
> NOT using delegator.findCountByCondition(...) because the latter does not
> allow supplying columns to be selected."
>
>
> On Fri, Apr 12, 2013 at 5:40 PM, Varun Bhansaly <[email protected]>wrote:
>
>> What is the best way of formulating a query which attempts to select two
>> distinct columns -
>> For example, the desired query is -
>>
>> SELECT DISTINCT PF.PRODUCT_FEATURE_TYPE_ID, PF.PRODUCT_FEATURE_CATEGORY_ID
>> FROM PRODUCT_FEATURE PF
>>
>> The closest which can be achieved is
>> SELECT DISTINCT (PF.PRODUCT_FEATURE_TYPE_ID,
>> PF.PRODUCT_FEATURE_CATEGORY_ID)
>> FROM PRODUCT_FEATURE PF
>> this generated query is not acceptable in MySQL but works fine in
>> PostgreSQL
>>
>> and its generated with this view definition -
>>
>> <view-entity entity-name="ProductFeatureView" package-name="mypackage">
>>         <member-entity entity-alias="PF" entity-name="ProductFeature"/>
>>
>>         <alias name="productFeatureTypeAndCategory" entity-alias="PF">
>>                 <complex-alias operator=",">
>>                         <complex-alias-field entity-alias="PF"
>> field="productFeatureTypeId"/>
>>                         <complex-alias-field entity-alias="PF"
>> field="productFeatureCategoryId"/>
>>                 </complex-alias>
>>         </alias>
>> </view-entity>
>>
>> I'm using OFBiz trunk and using delegator.find(...) and
>> delegator.findCountByCondition(...) because the latter does not allow
>> supplying columns to be selected.
>>
>> Thanks,
>>
>>
>>
>> --
>> View this message in context:
>> http://ofbiz.135035.n4.nabble.com/Selecting-distinct-columns-tp4640610.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
>
>
>
> --
> Regards,
> Varun Bhansaly
>



-- 
Regards,
Varun Bhansaly

Reply via email to