You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Ashish Vijaywargiya (JIRA)" <ji...@apache.org> on 2008/09/22 11:18:44 UTC

[jira] Commented: (OFBIZ-1963) Added support for migrating FacilityRole to FacilityParty

    [ https://issues.apache.org/jira/browse/OFBIZ-1963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633185#action_12633185 ] 

Ashish Vijaywargiya commented on OFBIZ-1963:
--------------------------------------------

Hello Surya,

While running the migration service from Webtools I am getting the following error :-

errorMessage  	ERROR: Could not complete the Migrate Data From FacilityRole To FacilityParty [file:/home/ashish/ofbiz_dev/other/applications/product/script/org/ofbiz/product/UpgradeServices.xml#migrateFacilityRole] process [problem creating the facilityParty value: Error while inserting: [GenericEntity:FacilityParty][createdStamp,2008-09-22 14:35:41.792(java.sql.Timestamp)][createdTxStamp,2008-09-22 14:35:41.76(java.sql.Timestamp)][facilityId,WebStoreWarehouse(java.lang.String)][fromDate,2008-09-22 14:35:41.792(java.sql.Timestamp)][lastUpdatedStamp,2008-09-22 14:35:41.792(java.sql.Timestamp)][lastUpdatedTxStamp,2008-09-22 14:35:41.76(java.sql.Timestamp)][partyId,approver(java.lang.String)][roleTypeId,ACCOUNT(java.lang.String)] (SQL Exception while executing the following:INSERT INTO public.FACILITY_PARTY (FACILITY_ID, PARTY_ID, ROLE_TYPE_ID, FROM_DATE, THRU_DATE, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: insert or update on table "facility_party" violates foreign key constraint "facility_prty_role" Detail: Key (party_id,role_type_id)=(approver,ACCOUNT) is not present in table "party_role".))]  	
responseMessage 	error 	
  	
To overcome from this error you should add the code to associate the roleTypeId with the partyId in the PartyRole table.
This error is coming because now we have added the foreign key constraint in the FacilityParty table with PartyRole table.

Please let me know if you need more description on this.

--
Ashish Vijaywargiya

> Added support for migrating FacilityRole to FacilityParty
> ---------------------------------------------------------
>
>                 Key: OFBIZ-1963
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1963
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: product
>            Reporter: surya kusumakar
>            Assignee: Ashish Vijaywargiya
>            Priority: Minor
>         Attachments: LatestUpdatedFacilityParty.patch
>
>
> 1)  Write a migrate service to upgrade existing data from the FacilityRole entity to the new FacilityParty entity. For these, changes has been made in UI as well.
> 2) The FacilityRole entity has been deprecated and new entity FacilityParty is created for these changes has been made in UI and entitymodel.xml files.
> 3) Also add fromDate and thruDate fields to maintain records of FacilityRole entity.
>             

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.