[OFBiz] Users - Entity Model Question

Si Chen schen at graciousstyle.com
Wed Sep 29 15:38:45 EDT 2004


Relations go both ways.  If you define a relation here to Party with 
partyId, you can still go from Party to Dealer_Properties with the 
getRelated.

Does this make sense?

Si

Adrian Crum wrote:

> I'm trying to set up my own entity that will contain additional 
> properties that are related to the Party entity. Here is the element 
> from the entitymodel.xml file:
>
>     <entity entity-name="Dealer_Properties"
>             package-name="org.ofbiz.dealer"
>             title="Dealer Properties Entity">
>       <field name="partyId" type="id-ne"></field>
>       <field name="dealer_Number" type="id"></field>
>       <field name="code" type="id"></field>
>       <field name="territory" type="id"></field>
>       <field name="state_Dealer_Number" type="id"></field>
>       <prim-key field="partyId"/>
>       <index name="DEALER_NUMBER_IDX">
>         <index-field name="dealer_Number"/>
>       </index>
>     </entity>
>
> After reading the Entity Engine guide, I'm still unable to determine 
> how I'm supposed to relate this entity to the Party entity. According 
> to the guide, the "relation" entry describes other entities that are 
> related to this one. I need to specify the relation going in the other 
> direction. In other words, this entity is a "child" of the Party entity.
>
> I don't want to modify the Party entitymodel.xml file.
>
> What do I do now?
>
>
> _______________________________________________
> Users mailing list
> Users at lists.ofbiz.org
> http://lists.ofbiz.org/mailman/listinfo/users
>


More information about the Users mailing list