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
This commit is contained in:
@@ -37,7 +37,7 @@ under the License.
|
||||
<!-- ========================================================= -->
|
||||
|
||||
<entity entity-name="EntityAuditLog" package-name="org.apache.ofbiz.entity.audit" title="Entity Audit Log">
|
||||
<field name="auditHistorySeqId" type="id-ne"><description>Sequenced primary key</description></field>
|
||||
<field name="auditHistorySeqId" type="id"><description>Sequenced primary key</description></field>
|
||||
<field name="changedEntityName" type="long-varchar"></field>
|
||||
<field name="changedFieldName" type="long-varchar"></field>
|
||||
<field name="pkCombinedValueText" type="long-varchar"></field>
|
||||
@@ -49,17 +49,17 @@ under the License.
|
||||
<prim-key field="auditHistorySeqId"/>
|
||||
</entity>
|
||||
<entity entity-name="EntityKeyStore" package-name="org.apache.ofbiz.entity.crypto" title="Entity Key Store Entity">
|
||||
<field name="keyName" type="id-vlong-ne"></field>
|
||||
<field name="keyName" type="id-vlong"></field>
|
||||
<field name="keyText" type="long-varchar"></field>
|
||||
<prim-key field="keyName"/>
|
||||
</entity>
|
||||
<entity entity-name="SequenceValueItem" package-name="org.apache.ofbiz.entity.sequence" title="Sequence Value Item Entity">
|
||||
<field name="seqName" type="id-long-ne"></field>
|
||||
<field name="seqName" type="id-long"></field>
|
||||
<field name="seqId" type="numeric"></field>
|
||||
<prim-key field="seqName"/>
|
||||
</entity>
|
||||
<entity entity-name="JavaResource" package-name="org.apache.ofbiz.entity" title="Java Resource">
|
||||
<field name="resourceName" type="id-vlong-ne" />
|
||||
<field name="resourceName" type="id-vlong" />
|
||||
<field name="resourceValue" type="byte-array" />
|
||||
<prim-key field="resourceName" />
|
||||
</entity>
|
||||
@@ -69,7 +69,7 @@ under the License.
|
||||
<!-- ========================================================= -->
|
||||
|
||||
<entity entity-name="Tenant" package-name="org.apache.ofbiz.entity.tenant">
|
||||
<field name="tenantId" type="id-ne"/>
|
||||
<field name="tenantId" type="id"/>
|
||||
<field name="tenantName" type="name"/>
|
||||
<field name="initialPath" type="value"/>
|
||||
<field name="disabled" type="indicator"><description>Disabled if 'Y', defaults to 'N' (not disabled).</description></field>
|
||||
@@ -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.
|
||||
</description>
|
||||
<field name="tenantId" type="id-ne"/>
|
||||
<field name="tenantId" type="id"/>
|
||||
<field name="entityGroupName" type="name"/>
|
||||
<field name="jdbcUri" type="long-varchar"/>
|
||||
<field name="jdbcUsername" type="long-varchar"/>
|
||||
@@ -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.
|
||||
</description>
|
||||
<field name="tenantId" type="id-ne"/>
|
||||
<field name="tenantId" type="id"/>
|
||||
<field name="kekText" type="long-varchar"></field>
|
||||
<prim-key field="tenantId"/>
|
||||
<relation type="one" fk-name="TNTKEK_TNT" rel-entity-name="Tenant">
|
||||
@@ -124,8 +124,8 @@ under the License.
|
||||
<!-- may be no reason for this entity, user is authenticated inside the tenant and this would only be useful to
|
||||
get a list of tenants per user
|
||||
<entity entity-name="TenantUserLogin" package-name="org.apache.ofbiz.entity.tenant">
|
||||
<field name="tenantId" type="id-ne"/>
|
||||
<field name="userLoginId" type="id-vlong-ne"/>
|
||||
<field name="tenantId" type="id"/>
|
||||
<field name="userLoginId" type="id-vlong"/>
|
||||
<field name="fromDate" type="date-time"/>
|
||||
<field name="thruDate" type="date-time"/>
|
||||
<prim-key field="tenantId"/>
|
||||
@@ -145,7 +145,7 @@ under the License.
|
||||
</entity>
|
||||
<entity entity-name="TenantComponent" package-name="org.apache.ofbiz.entity.tenant">
|
||||
<description></description>
|
||||
<field name="tenantId" type="id-ne"></field>
|
||||
<field name="tenantId" type="id"></field>
|
||||
<field name="componentName" type="name"></field>
|
||||
<field name="sequenceNum" type="numeric"></field>
|
||||
<prim-key field="componentName"/>
|
||||
@@ -159,7 +159,7 @@ under the License.
|
||||
</entity>
|
||||
<entity entity-name="TenantDomainName" package-name="org.apache.ofbiz.entity.tenant"
|
||||
title="Tenant and its Domain Name">
|
||||
<field name="tenantId" type="id-ne"></field>
|
||||
<field name="tenantId" type="id"></field>
|
||||
<field name="domainName" type="long-varchar"></field>
|
||||
<prim-key field="domainName"/>
|
||||
<relation type="one" fk-name="TNNT_DMNAM" rel-entity-name="Tenant">
|
||||
|
||||
Reference in New Issue
Block a user