Le 11/06/2015 16:18, Jacopo Cappellato a écrit :
On Jun 11, 2015, at 3:51 PM, Taher Alkhateeb <[email protected]> wrote:
I would like to help and I think we need to think carefully of the layout /
structure though i.e. how to breakup the entities in files and/or directories.
I would suggest that, at least in the first step, we do it in a simple way like
the following:
1) create the new component, named for example "datamodel" (please suggest a
better name)
applications/common-layer
applications/functional-layer
2) move all the entity xml files from the applications to the "datamodel"
component keeping the files separated as they are, but adding a prefix; for example
applications/accounting/entitidef/entitymodel.xml
will be moved to:
applications/datamodel/entitidef/accounting-entitymodel.xml
The end result will be a "datamodel" component with an entitidef/ folder
containing several files, approximately one per application component
My preference goes to use the package path but add complexity for few. I
see :
applications/functional-layer/entitydef/model/entitymodel-accounting.xml
applications/functional-layer/entitydef/eca/eeca-accounting.xml
applications/functional-layer/servicedef/model/services-accounting.xml
applications/functional-layer/servicedef/eca/seca-accounting.xml
But currently some component already have multiple entitymodel file to
segment entities so why not :
applications/functional-layer/entitydef/model/accounting/entitymodel.xml
applications/functional-layer/entitydef/model/accounting/entitymodel-invoice.xml
applications/functional-layer/entitydef/model/accounting/entitymodel-payment.xml
applications/functional-layer/entitydef/eca/accounting/eeca.xml
3) similar approach for eeca files
4) add the relevant entries in
applications/datamodel/ofbiz-component.xml
We can simplify entries with regexp like this
<entity-resource type="model" loader="main"
location="entitydef/model/*"/>
or just
<entity-resource type="model" loader="main"
dir-location="entitydef/model/accounting/"/>
Nicolas
Regards,
Jacopo