Entity Update

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

Entity Update

joysaha123
How can i update entity defination,

I have added 2 new fields in the entity "ProductPrice" in the entity defination xml,
then restart server ,

is this the right way to update entity ?
How can i confirm the change ?

I am not able to update entity in the entity definition.
Reply | Threaded
Open this post in threaded view
|

Re: Entity Update

rrhati2010
Hi Joysaha,

That's not the right way to add fields to an entity as you are directly modifying the entitymodel.xml of an ofbiz's component.
Rather you need to define the entitymodel.xml  in your custom component deployed in "hot-deploy" and extend the ProductPrice entity from the product model of ofbiz.

Sample:
<extend-entity entity-name="ProductPrice">
        <field name="field1" type="very-short"></field>
        <field name="field2" type="very-short"></field>
.
.
.
.
</extend-entity>


Refer this link for extending concept of ofbiz
https://cwiki.apache.org/OFBIZ/addressing-custom-requirements-in-ofbiz.html
RRH