I want the view entity for query
select distinct p.product_id, p.internal_name from product p inner join supplier_product sp on p.product_id=sp.product_id
I tried
<view-entity entity-name="ProductAndSupplierProduct"
package-name="org.ofbiz.product.supplier"
title="Supplier-product and product antityview for purchase order entry">
<member-entity entity-alias="SP" entity-name="SupplierProduct"/>
<member-entity entity-alias="PR" entity-name="Product"/>
<alias-all entity-alias="SP"/>
<alias-all entity-alias="PR">
<exclude field="productId"/>
<exclude field="comments"/>
<exclude field="quantityUomId"/>
</alias-all>
<view-link entity-alias="SP" rel-entity-alias="PR" >
<key-map field-name="productId" rel-field-name="productId"/>
<entity-condition distinct="true"><condition-expr field-name="productId" entity-alias="SP" rel-entity-alias="PR" rel-field-name="productId" operator="in"/></entity-condition>
</view-link>
</view-entity>
It will not give the correct output. Please help me to find the solution.