From ff4e16e98e3a3b4cd17ba74c3d43462d374197ce Mon Sep 17 00:00:00 2001 From: Jacques Le Roux Date: Wed, 10 May 2017 18:40:24 +0000 Subject: [PATCH] Implemented: Replace fields with "id-ne", "id-long-ne" and "id-vlong-ne" with "id", "id-long" and "id-vlong" respectively which are primary keys (OFBIZ-9354) As discussed in http://markmail.org/message/d2tpovewhtotukwa the "not empty" field types ("id-ne", "id-long-ne" and "id-vlong-ne") were initially added to implement validations on data. But, because the validations where only implemented in some place like webtools, it contradicts the distinction to be upheld on various layers. So it is better to remove these field types. So we will remove all those field types and will create sub tickets to replace them in entity definitions by corresponding "id" types. When replacing the "not empty" field types in entity definitions by corresponding "id" types we will add a *not-null="true"* attribute to "makes the field NOT NULL on the database (like primary key fields)" as explained in "not-null" documentation in fieldtypemodel.xsd. We will finally clean the documentation of the "not-null" in fieldtypemodel.xsd. Deepak: If field is define as primary key field so by default is will be set as not-null=true, so we can replace all the primary key field type from id-ne to id in one shot. Thanks: Deepak and Aditya git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1794743 13f79535-47bb-0310-9956-ffa450edef68 --- framework/entity/entitydef/entitymodel.xml | 22 ++++++++--------- .../entity/entitydef/entitymodel_test.xml | 24 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/framework/entity/entitydef/entitymodel.xml b/framework/entity/entitydef/entitymodel.xml index d342d92170..e1b20c723f 100644 --- a/framework/entity/entitydef/entitymodel.xml +++ b/framework/entity/entitydef/entitymodel.xml @@ -37,7 +37,7 @@ under the License. - Sequenced primary key + Sequenced primary key @@ -49,17 +49,17 @@ under the License. - + - + - + @@ -69,7 +69,7 @@ under the License. - + Disabled if 'Y', defaults to 'N' (not disabled). @@ -80,7 +80,7 @@ under the License. There should be one record for each tenant and each group-map for the active delegator. The jdbc fields will override the datasource -> inline-jdbc values for the per-tenant delegator. - + @@ -114,7 +114,7 @@ under the License. There should be one record for each tenant and each group-map for the active delegator. The jdbc fields will override the datasource -> inline-jdbc values for the per-tenant delegator. - + @@ -124,8 +124,8 @@ under the License. - + @@ -98,7 +98,7 @@ under the License. package-name="org.apache.ofbiz.entity.test" title="Entity for testing EntityStatus concept"> An entity for testing EntityStatus concept - + @@ -118,7 +118,7 @@ under the License. package-name="org.apache.ofbiz.entity.test" title="Entity for testing the field data types"> An entity for testing the field data types - + @@ -137,8 +137,8 @@ under the License. - - + + @@ -153,7 +153,7 @@ under the License. - + @@ -171,8 +171,8 @@ under the License. - - + + @@ -219,7 +219,7 @@ under the License. - + @@ -245,7 +245,7 @@ under the License. - +