portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hajo Birthelmer (JIRA)" <jetspeed-...@portals.apache.org>
Subject [jira] Commented: (JS2-662) Circular FK reference in the Jetspeed 2.1 SQL Server script
Date Wed, 14 Mar 2007 20:59:09 GMT

    [ https://issues.apache.org/jira/browse/JS2-662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480925
] 

Hajo Birthelmer commented on JS2-662:
-------------------------------------

According to Microsoft (http://support.microsoft.com/kb/321843 et.al.) the solution is use
triggers.
In our case it means 
(1) create a MSSQL specific phase-2-schema.sql
(2) replace there on Table FOLDER
    FOREIGN KEY (PARENT_ID) REFERENCES FOLDER (FOLDER_ID)
        ON DELETE CASCADE 
with 
    FOREIGN KEY (PARENT_ID) REFERENCES FOLDER (FOLDER_ID)
ON DELETE  NO ACTION ON UPDATE NO ACTION
 (3) add an INSTEAD OF Trigger for DELETE to remove the parent row....


> Circular FK reference in the Jetspeed 2.1 SQL Server script
> -----------------------------------------------------------
>
>                 Key: JS2-662
>                 URL: https://issues.apache.org/jira/browse/JS2-662
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Installer
>    Affects Versions: 2.1
>         Environment: SQL Server 2005
>            Reporter: Andrew Hall
>             Fix For: 2.1
>
>
> The db won't build.  I get the following error on the Folders table:
> "Introducing FOREIGN KEY constaint 'FK_FOLDER_1' on table 'FOLDER' may cause cycles or
multiple cascade paths.  Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other
FOREIGN KEY constraints."

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


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message