You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2012/10/28 16:31:11 UTC

[jira] [Closed] (CAY-116) Improve DbAdapter to support cascading drop constraints when DB does not

     [ https://issues.apache.org/jira/browse/CAY-116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrus Adamchik closed CAY-116.
-------------------------------

       Resolution: Won't Fix
    Fix Version/s:     (was: Undefined future)

closing legacy issue
                
> Improve DbAdapter to support cascading drop constraints when DB does not
> ------------------------------------------------------------------------
>
>                 Key: CAY-116
>                 URL: https://issues.apache.org/jira/browse/CAY-116
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Core Library
>    Affects Versions: 1.0 [LEGACY], 1.1 [LEGACY]
>         Environment: Sybase 11, Linux
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>            Priority: Minor
>
> When running unit tests with the new test schema ("people"), Sybase chokes on 2nd and subsequent runs since there a circular relationship PERSON -> DEPARTMENT -> PERSON. Sybase has no "CASCADE CONSTRAINTS" clause in the DROP command. 
> This is fixed inside SybaseStackAdapter by manually dropping constraints like this:
> SELECT t0.name FROM sysobjects t0, sysconstraints t1, sysobjects t2
> WHERE t0.id = t1.constrid and t1.tableid = t2.id and t2.name = 'DEPARTMENT'
> and then
> alter table DEPARTMENT drop constraint XYZ
> TODO: DbAdapter only allows a single statement for dropTable. We need to redefine DbAdapter API to allow more then one statement... 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira