Entity model creation of composite key

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

Entity model creation of composite key

G.Venkata Phanindra
Hi ,
 I want to add my own Entity in ofbiz, from the document i have seen its
very easy to do it using the entitymodel.xml files .
but i wantted to create a key which will be combination of two keys.
following is my data Model defination
    <entity entity-name="GeoHoliday"
            package-name="com.ecomzera.ezoz"
            title="Geo Holidays list">
      <field name="geoId" type="id-ne"></field>
      <field name="holidayId" type="id-ne"></field>
      <field name="description" type="description"></field>
      <!-- TODO specify the forieng key constraints -->
    </entity>
Now i want to relate geoId to Ofbiz Geo Table geoid and also create a
primary key as a combination of geoid n holiday id.
 how do i define this
G.Venkata Phanindra
Mob:: 9849852989