On 15/01/2015 6:23 PM, Youssef Khaye wrote:
Please see inline
Le 15/01/2015 23:21, Ron Wheeler a écrit :
I my research about data loading and the data model, I have come
across may interesting things.
There are also some questions that I have not been able to answer.
1) In entitymodel.xml files I find reference id-ne.
<field name="partyIdTo" type="id-ne"></field>
What does id-ne mean?
Since ofbiz was designed to work with lost common market databases, we
can not use a specific database data type in the entitymodel file,
instead with use a set of type that should be mapped to underlying
databse .
look at mapping files at framework/entity/fieldtype
for example : with a postgresql database the id-ne is mapped to
VARCHAR(20) according to framework/entity/fieldtype/fieldtypepostgres.xml
<field-type-def type="id-ne" sql-type="VARCHAR(20)" java-type="String"/>
So partyIdTo="ABC" is fine but partyIdTo="" is illegal.
This leaves question "Can partyIdTo be missing altogether?" Is there
any way that optional and required fields are specified.
2) in the seed data for the accounting application there are
references to BILL_FROM_VENDOR and many other roleTypeIds
<entity-engine-xml>
<!-- The main Company Internal Organization -->
<Party partyId="Company" partyTypeId="PARTY_GROUP"/>
<PartyGroup partyId="Company" groupName="Your Company Name Here"/>
<PartyRole partyId="Company" roleTypeId="BILL_FROM_VENDOR"/>
Where are these defined? Is there a place where the valid list of
roleTypeIds get loaded.
in general type data should be found in <Component_name>TYpeData.xml
under data directory for each componenet, since this is related to
party you should find BILL_FROM_VENDOR in
applications/party/data/PartyTypeData.xml
3) There are other TypeIds that seem to have values that might mean
things in code
<PartyContactMechPurpose partyId="Company" contactMechId="9000"
contactMechPurposeTypeId="PAYMENT_LOCATION" fromDate="2000-01-01
00:00:00.000"/>
Is there some place where the uses of these types are documented?
Sorry I don't know !
Where loaded in the seed data?
ContactMechTypePurpose data is also defined in
applications/party/data/PartyTypeData.xml
If I change this to contactMechPurposeTypeId="PAY_LOCATION"will this
cause problems for code.
technically no if you define a new contactMechPurposeType PAY_LOCATION
You may use and IDE search function to find the data you want :-)
Good point. I have now loaded it into STS
Search works very well.
Ron
--
Ron Wheeler
President
Artifact Software Inc
email: [email protected]
skype: ronaldmwheeler
phone: 866-970-2435, ext 102