Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.1
-
Fix Version/s: 1.3.2 (Beta)
-
Component/s: Data Management
-
Labels:None
-
Environment:1-1-beta4
-
Complexity:Intermediate
-
Number of attachments :
Description
one group project with 2 member projects;
cannot delete members:
javax.jdo.JDOUserException: One or more instances could not be deleted NestedThrowables: javax.jdo.JDODataStoreException: Delete request failed: DELETE FROM PROJECTDEPENDENCY WHERE PROJECTDEPENDENCY_ID=? NestedThrowables: SQL Exception: DELETE on table 'PROJECTDEPENDENCY' caused a violation of foreign key constraint 'PROJECT_FK2' for key (1219321). The statement has been rolled back.
I found there were three foreign key constraints on the PROJECT table
CONSTRAINT PROJECT_FK1 FOREIGN KEY (PARENT_PROJECTDEPENDENCY_ID_OID) REFERENCES PROJECTDEPENDENCY (PROJECTDEPENDENCY_ID);
CONSTRAINT PROJECT_FK2 FOREIGN KEY (PARENT_PROJECTDEPENDENCY_ID_OID) REFERENCES SCMRESULT (SCMRESULT_ID);
CONSTRAINT PROJECT_FK3 FOREIGN KEY (PARENT_PROJECTDEPENDENCY_ID_OID) REFERENCES PROJECTGROUP (ID);
I updated the first constraint to 'ON DELETE SET NULL', and dropped the two others, so now it works.
I have no idea what PROJECT_FK2 and PROJECT_FK3 are supposed to do. I only found in continuum-model JPOX config file:
<class>
<name>Project</name>
<version>1.0.9+</version>
<fields>
[...]
<field jpox.fetch-groups="project-all-details project-dependencies">
<name>parent</name>
<version>1.0.9+</version>
<association jpox.join="false">
<type>ProjectDependency</type>
</association>
</field>