You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2017/07/06 07:45:01 UTC
[jira] [Comment Edited] (OFBIZ-1607) let the ofbiz work with db2
[ https://issues.apache.org/jira/browse/OFBIZ-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564306#comment-12564306 ]
Jacques Le Roux edited comment on OFBIZ-1607 at 7/6/17 7:44 AM:
----------------------------------------------------------------
the other configuration to let ofbiz work with the db2
1.change the database pagesize to 16k
2.add two fk-name to two entity's relation, one is PartyInvitationGroupAssoc the other is PartyInvitationRoleAssoc:
{code}
<entity entity-name="PartyInvitationGroupAssoc"
package-name="org.ofbiz.party.party"
title="Party Invitation Group Assoc Entity">
<field name="partyInvitationId" type="id-ne"></field>
<field name="partyIdTo" type="id-ne"></field>
<prim-key field="partyInvitationId"/>
<prim-key field="partyIdTo"/>
<relation type="one" title="To" rel-entity-name="PartyGroup">
<key-map field-name="partyIdTo" rel-field-name="partyId"/>
</relation>
<relation type="one" title="To" rel-entity-name="Party">
<key-map field-name="partyIdTo" rel-field-name="partyId"/>
</relation>
<relation type="one" fk-name="PTY_INT_GA_PTY_INT" rel-entity-name="PartyInvitation">
<key-map field-name="partyInvitationId"/>
</relation>
</entity>
<entity entity-name="PartyInvitationRoleAssoc"
package-name="org.ofbiz.party.party"
title="Party Invitation Role Assoc Entity">
<field name="partyInvitationId" type="id-ne"></field>
<field name="roleTypeId" type="id-ne"></field>
<prim-key field="partyInvitationId"/>
<prim-key field="roleTypeId"/>
<relation type="one" rel-entity-name="RoleType">
<key-map field-name="roleTypeId"/>
</relation>
<relation type="one" fk-name="PTY_INT_RA_PTY_INT" rel-entity-name="PartyInvitation">
<key-map field-name="partyInvitationId"/>
</relation>
</entity>
{code}
this avoid the same fk-name problems. I think it's the good habit we need add the fk-name if there is more than one relation with the same entity.
3.the INVITEM_SOFID and INVITEM_ACTNM index is unique in InventoryItem entity, but The demo data do not include the unique data. so, when insert the data It will thrown exeception, it happen in DemoProduct.xml, I add the data like this:
{code}
<InventoryItem facilityId="WebStoreWarehouse" locationSeqId="TLTLTLUL01"
inventoryItemId="9000" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-2644" ownerPartyId="Company" currencyUomId="USD" unitCost="2.5" softIdentifier="9000" activationNumber="9000"/>
<InventoryItemDetail inventoryItemId="9000" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="500" quantityOnHandDiff="500"/>
<InventoryItem facilityId="WebStoreWarehouse" locationSeqId="TLTLTLLL01"
inventoryItemId="9001" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-2644" ownerPartyId="Company" currencyUomId="USD" unitCost="2.5" softIdentifier="9001" activationNumber="9001"/>
<InventoryItemDetail inventoryItemId="9001" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="5" quantityOnHandDiff="5"/>
<InventoryItem facilityId="WebStoreWarehouse" locationSeqId="TLTLTLUL02"
inventoryItemId="9002" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-8544" ownerPartyId="Company" currencyUomId="USD" unitCost="3.0" softIdentifier="9002" activationNumber="9002"/>
<InventoryItemDetail inventoryItemId="9002" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="15" quantityOnHandDiff="15"/>
<InventoryItem facilityId="WebStoreWarehouse" locationSeqId="TLTLTLLL02"
inventoryItemId="9003" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-8544" ownerPartyId="Company" currencyUomId="USD" unitCost="3.0" softIdentifier="9003" activationNumber="9003"/>
<InventoryItemDetail inventoryItemId="9003" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="3" quantityOnHandDiff="3"/>
<InventoryItem facilityId="WebStoreWarehouse" locationSeqId="TLTLTLUL03"
inventoryItemId="9004" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="WG-1111" ownerPartyId="Company" currencyUomId="USD" unitCost="4.5" softIdentifier="9004" activationNumber="9004"/>
<InventoryItemDetail inventoryItemId="9004" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="50" quantityOnHandDiff="50"/>
<InventoryItem facilityId="WebStoreWarehouse" locationSeqId="TLTLTLLL03"
inventoryItemId="9005" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="WG-1111" ownerPartyId="Company" currencyUomId="USD" unitCost="4.5" softIdentifier="9005" activationNumber="9005"/>
<InventoryItemDetail inventoryItemId="9005" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="5" quantityOnHandDiff="5"/>
<InventoryItem facilityId="WebStoreWarehouse" locationSeqId="TLTLTLUL04"
inventoryItemId="9006" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="WG-5569" ownerPartyId="Company" currencyUomId="USD" unitCost="5.0" softIdentifier="9006" activationNumber="9006"/>
<InventoryItemDetail inventoryItemId="9006" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="10" quantityOnHandDiff="10"/>
<InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9010" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="WG-9943-B3" ownerPartyId="Company" currencyUomId="USD" unitCost="3.5" softIdentifier="9010" activationNumber="9010"/>
<InventoryItemDetail inventoryItemId="9010" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="10" quantityOnHandDiff="10"/>
<InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9011" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="WG-9943-B4" ownerPartyId="Company" currencyUomId="USD" unitCost="3.5" softIdentifier="9011" activationNumber="9011"/>
<InventoryItemDetail inventoryItemId="9011" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="10" quantityOnHandDiff="10"/>
<InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9012" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="WG-9943-S3" ownerPartyId="Company" currencyUomId="USD" unitCost="3.5" softIdentifier="9012" activationNumber="9012"/>
<InventoryItemDetail inventoryItemId="9012" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="10" quantityOnHandDiff="10"/>
<InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9013" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="WG-9943-S4" ownerPartyId="Company" currencyUomId="USD" unitCost="3.5" softIdentifier="9013" activationNumber="9013"/>
<InventoryItemDetail inventoryItemId="9013" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="10" quantityOnHandDiff="10"/>
<InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9021" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-1006-1" ownerPartyId="Company" currencyUomId="USD" unitCost="2.4" softIdentifier="9021" activationNumber="9021"/>
<InventoryItemDetail inventoryItemId="9021" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="8" quantityOnHandDiff="8"/>
<InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9022" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-1006-2" ownerPartyId="Company" currencyUomId="USD" unitCost="2.4" softIdentifier="9022" activationNumber="9022"/>
<InventoryItemDetail inventoryItemId="9022" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="8" quantityOnHandDiff="8"/>
<InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9023" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-1006-3" ownerPartyId="Company" currencyUomId="USD" unitCost="2.4" softIdentifier="9023" activationNumber="9023"/>
<InventoryItemDetail inventoryItemId="9023" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="8" quantityOnHandDiff="8"/>
<InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9024" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-1006-4" ownerPartyId="Company" currencyUomId="USD" unitCost="2.4" softIdentifier="9024" activationNumber="9024"/>
<InventoryItemDetail inventoryItemId="9024" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="8" quantityOnHandDiff="8"/>
{code}
4. good luck, if there is any problem please let me know.
was (Author: jack_guo):
the other configuration to let ofbiz work with the db2
1.change the database pagesize to 16k
2.add two fk-name to two entity's relation, one is PartyInvitationGroupAssoc the other is PartyInvitationRoleAssoc:
<entity entity-name="PartyInvitationGroupAssoc"
package-name="org.ofbiz.party.party"
title="Party Invitation Group Assoc Entity">
<field name="partyInvitationId" type="id-ne"></field>
<field name="partyIdTo" type="id-ne"></field>
<prim-key field="partyInvitationId"/>
<prim-key field="partyIdTo"/>
<relation type="one" title="To" rel-entity-name="PartyGroup">
<key-map field-name="partyIdTo" rel-field-name="partyId"/>
</relation>
<relation type="one" title="To" rel-entity-name="Party">
<key-map field-name="partyIdTo" rel-field-name="partyId"/>
</relation>
<relation type="one" fk-name="PTY_INT_GA_PTY_INT" rel-entity-name="PartyInvitation">
<key-map field-name="partyInvitationId"/>
</relation>
</entity>
<entity entity-name="PartyInvitationRoleAssoc"
package-name="org.ofbiz.party.party"
title="Party Invitation Role Assoc Entity">
<field name="partyInvitationId" type="id-ne"></field>
<field name="roleTypeId" type="id-ne"></field>
<prim-key field="partyInvitationId"/>
<prim-key field="roleTypeId"/>
<relation type="one" rel-entity-name="RoleType">
<key-map field-name="roleTypeId"/>
</relation>
<relation type="one" fk-name="PTY_INT_RA_PTY_INT" rel-entity-name="PartyInvitation">
<key-map field-name="partyInvitationId"/>
</relation>
</entity>
this avoid the same fk-name problems. I think it's the good habit we need add the fk-name if there is more than one relation with the same entity.
3.the INVITEM_SOFID and INVITEM_ACTNM index is unique in InventoryItem entity, but The demo data do not include the unique data. so, when insert the data It will thrown exeception, it happen in DemoProduct.xml, I add the data like this:
<InventoryItem facilityId="WebStoreWarehouse" locationSeqId="TLTLTLUL01"
inventoryItemId="9000" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-2644" ownerPartyId="Company" currencyUomId="USD" unitCost="2.5" softIdentifier="9000" activationNumber="9000"/>
<InventoryItemDetail inventoryItemId="9000" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="500" quantityOnHandDiff="500"/>
<InventoryItem facilityId="WebStoreWarehouse" locationSeqId="TLTLTLLL01"
inventoryItemId="9001" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-2644" ownerPartyId="Company" currencyUomId="USD" unitCost="2.5" softIdentifier="9001" activationNumber="9001"/>
<InventoryItemDetail inventoryItemId="9001" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="5" quantityOnHandDiff="5"/>
<InventoryItem facilityId="WebStoreWarehouse" locationSeqId="TLTLTLUL02"
inventoryItemId="9002" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-8544" ownerPartyId="Company" currencyUomId="USD" unitCost="3.0" softIdentifier="9002" activationNumber="9002"/>
<InventoryItemDetail inventoryItemId="9002" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="15" quantityOnHandDiff="15"/>
<InventoryItem facilityId="WebStoreWarehouse" locationSeqId="TLTLTLLL02"
inventoryItemId="9003" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-8544" ownerPartyId="Company" currencyUomId="USD" unitCost="3.0" softIdentifier="9003" activationNumber="9003"/>
<InventoryItemDetail inventoryItemId="9003" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="3" quantityOnHandDiff="3"/>
<InventoryItem facilityId="WebStoreWarehouse" locationSeqId="TLTLTLUL03"
inventoryItemId="9004" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="WG-1111" ownerPartyId="Company" currencyUomId="USD" unitCost="4.5" softIdentifier="9004" activationNumber="9004"/>
<InventoryItemDetail inventoryItemId="9004" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="50" quantityOnHandDiff="50"/>
<InventoryItem facilityId="WebStoreWarehouse" locationSeqId="TLTLTLLL03"
inventoryItemId="9005" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="WG-1111" ownerPartyId="Company" currencyUomId="USD" unitCost="4.5" softIdentifier="9005" activationNumber="9005"/>
<InventoryItemDetail inventoryItemId="9005" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="5" quantityOnHandDiff="5"/>
<InventoryItem facilityId="WebStoreWarehouse" locationSeqId="TLTLTLUL04"
inventoryItemId="9006" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="WG-5569" ownerPartyId="Company" currencyUomId="USD" unitCost="5.0" softIdentifier="9006" activationNumber="9006"/>
<InventoryItemDetail inventoryItemId="9006" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="10" quantityOnHandDiff="10"/>
<InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9010" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="WG-9943-B3" ownerPartyId="Company" currencyUomId="USD" unitCost="3.5" softIdentifier="9010" activationNumber="9010"/>
<InventoryItemDetail inventoryItemId="9010" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="10" quantityOnHandDiff="10"/>
<InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9011" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="WG-9943-B4" ownerPartyId="Company" currencyUomId="USD" unitCost="3.5" softIdentifier="9011" activationNumber="9011"/>
<InventoryItemDetail inventoryItemId="9011" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="10" quantityOnHandDiff="10"/>
<InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9012" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="WG-9943-S3" ownerPartyId="Company" currencyUomId="USD" unitCost="3.5" softIdentifier="9012" activationNumber="9012"/>
<InventoryItemDetail inventoryItemId="9012" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="10" quantityOnHandDiff="10"/>
<InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9013" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="WG-9943-S4" ownerPartyId="Company" currencyUomId="USD" unitCost="3.5" softIdentifier="9013" activationNumber="9013"/>
<InventoryItemDetail inventoryItemId="9013" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="10" quantityOnHandDiff="10"/>
<InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9021" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-1006-1" ownerPartyId="Company" currencyUomId="USD" unitCost="2.4" softIdentifier="9021" activationNumber="9021"/>
<InventoryItemDetail inventoryItemId="9021" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="8" quantityOnHandDiff="8"/>
<InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9022" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-1006-2" ownerPartyId="Company" currencyUomId="USD" unitCost="2.4" softIdentifier="9022" activationNumber="9022"/>
<InventoryItemDetail inventoryItemId="9022" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="8" quantityOnHandDiff="8"/>
<InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9023" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-1006-3" ownerPartyId="Company" currencyUomId="USD" unitCost="2.4" softIdentifier="9023" activationNumber="9023"/>
<InventoryItemDetail inventoryItemId="9023" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="8" quantityOnHandDiff="8"/>
<InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9024" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-1006-4" ownerPartyId="Company" currencyUomId="USD" unitCost="2.4" softIdentifier="9024" activationNumber="9024"/>
<InventoryItemDetail inventoryItemId="9024" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="8" quantityOnHandDiff="8"/>
4. good luck, if there is any problem please let me know.
> let the ofbiz work with db2
> ---------------------------
>
> Key: OFBIZ-1607
> URL: https://issues.apache.org/jira/browse/OFBIZ-1607
> Project: OFBiz
> Issue Type: New Feature
> Components: framework
> Affects Versions: Trunk
> Environment: db2 v9.1.0.356
> Reporter: WeizhanGuo
> Assignee: Jacques Le Roux
> Fix For: 16.11.01
>
> Attachments: contentForm.diff, entityFordb2.diff
>
> Original Estimate: 40m
> Remaining Estimate: 40m
>
> create the db2filedtype file ;
> change the seed/demo data to fixed the db2 requirement;
> change some relation define if needed;
> others
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)