You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@continuum.apache.org by "Geert Pante (JIRA)" <ji...@codehaus.org> on 2008/11/20 17:28:41 UTC
[jira] Commented: (CONTINUUM-1787) cannot delete a project,
constraint violation
[ http://jira.codehaus.org/browse/CONTINUUM-1787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=154903#action_154903 ]
Geert Pante commented on CONTINUUM-1787:
----------------------------------------
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>
> cannot delete a project, constraint violation
> ---------------------------------------------
>
> Key: CONTINUUM-1787
> URL: http://jira.codehaus.org/browse/CONTINUUM-1787
> Project: Continuum
> Issue Type: Bug
> Components: Data Management
> Affects Versions: 1.1
> Environment: 1-1-beta4
> Reporter: tony nys
> Fix For: 1.3
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira