Data Loading and Entity Modification

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

Data Loading and Entity Modification

JS
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Data Loading and Entity Modification

Youssef Khaye

Le 03/04/2014 21:46, JS a écrit :

> Hello,
>
> I have a question about the entity engine in OFBiz, mainly pertaining to how
> changes to "entitymodel.xml" and seed data are handled when there is already
> data in the entity.
>
> I've done some searches and experimentation on my own to try and determine
> this but came up inconclusive results:
>
> 1) If more seed data needs to be loaded after the system is already in
> production, will the seed data loader skip loading records which are already
> in the entity, and only add the new ones? If not, what is the recommended
> way to add the new data to the entity if not using the seed data loading
> functionality?

when loading data (seed or demo ) from xml file, ofbiz proceed as
folowing for each xml entry :
create a database record if it does not exists.
if the record exists and has at least one field with diffrenet value it
make an update operation.
otherwise it does noting for the given xml entry.
for more detail, see create-replace that may change the entity loader
behavior
>
> 2) If a schema change is required (i.e. data type change, column
> addition/removal) how do you go about doing this on a system already in
> production (which will have existing data), using the entity engine? If it
> can't be done with just the entity engine and would require an external DB
> tool to do so, how do you ensure that OFBiz's "entitymodel" is back in sync
> with the new DB schema?
ofbiz can only add missing tables, fields, contraints, indicies etc...
to get database schema sync with its entitymodel.

operations like;
removing no more used tables, fileds..
change field type or name ...
should be done by the database administrator.
of course you should update your entity model and make sure it is sync
with the database schema (look at ofbiz start log if the check-on-start
is enabled in entity-engiine)

> Thanks!
> J
>
>
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Data-Loading-and-Entity-Modification-tp4650171.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.