You can do that as Jacques proposed:

<set field="lookupMap.productId" from-field="parameters.productId"/>
<find-by-and entity-name="ProductAssoc" map-name="lookupMap"
list-name="productAssocs"/>

you will get list(productAssocs) with all records from ProductAssoc
entity that corespond to this expression:
 - ProductAssoc.productId = parameters.productId

Regards,
Rashko Rejmer

On Fri, 2007-12-21 at 04:55 -0800, Kishore.M wrote:
> Hi all,
> Following is the entity model for the entity ProductAssoc
> 
> <entity entity-name="ProductAssoc"
>             package-name="org.ofbiz.product.product"
>             title="Product Association Entity">
>       <field name="productId" type="id-ne"></field>
>       <field name="productIdTo" type="id-ne"></field>
>       <field name="productAssocTypeId" type="id-ne"></field>
>       <field name="fromDate" type="date-time"></field>
>       <field name="thruDate" type="date-time"></field>
>       <field name="sequenceNum" type="numeric"></field>
>       <field name="reason" type="long-varchar"></field>
>       <field name="quantity" type="floating-point"></field>
>       <field name="scrapFactor" type="floating-point"></field>
>       <field name="instruction" type="long-varchar"></field>
>       <field name="routingWorkEffortId" type="id"></field>
>       <field name="estimateCalcMethod" type="id"></field>
>       <field name="recurrenceInfoId" type="id"></field>
>       <prim-key field="productId"/>
>       <prim-key field="productIdTo"/>
>       <prim-key field="productAssocTypeId"/>
>       <prim-key field="fromDate"/>
>       <relation type="one" fk-name="PROD_ASSOC_TYPE"
> rel-entity-name="ProductAssocType">
>         <key-map field-name="productAssocTypeId"/>
>       </relation>
>       <relation type="one" fk-name="PROD_ASSOC_MPROD" title="Main"
> rel-entity-name="Product">
>         <key-map field-name="productId"/>
>       </relation>
>       <relation type="one" fk-name="PROD_ASSOC_APROD" title="Assoc"
> rel-entity-name="Product">
>         <key-map field-name="productIdTo" rel-field-name="productId"/>
>       </relation>
>       <relation type="one" fk-name="PROD_ASSOC_RTWE" title="Routing"
> rel-entity-name="WorkEffort">
>         <key-map field-name="routingWorkEffortId"
> rel-field-name="workEffortId"/>
>       </relation>
>       <relation type="one" fk-name="PROD_ASSOC_CUSM"
> rel-entity-name="CustomMethod">
>         <key-map field-name="estimateCalcMethod"
> rel-field-name="customMethodId"/>
>       </relation>
>         <relation type="one" fk-name="PROD_ASSOC_RECINFO"
> rel-entity-name="RecurrenceInfo">
>             <key-map field-name="recurrenceInfoId"/>
>         </relation>
>     </entity>
> 
> 
> I want to implement a service in minilang.In that service I want to get the
> corresponding values from the entity "ProductAssoc" by passing only
> "productId" without passing all the primary keys.
> Is there any way to do that?
> 
> please help me out.
> 
> regards,
> Kishore.M
> 

Reply via email to