Andrus Adamchik commented on CAY-116:
-------------------------------------
Changed DbAdapter API to allow multiple statements for a single "drop".. Implemented a multi-statement drop for MySQL. Need to do it for other DBs and clean up AccessStackAdapter hack.
> Improve DbAdapter to support cascading drop constraints when DB does not
> ------------------------------------------------------------------------
>
> Key: CAY-116
> URL: https://issues.apache.org/cayenne/browse/CAY-116
> Project: Cayenne
> Issue Type: Improvement
> Components: Cayenne Core Library
> Affects Versions: 1.0 [LEGACY], 1.1 [LEGACY]
> Environment: Sybase 11, Linux
> Reporter: Andrus Adamchik
> Assignee: Andrus Adamchik
> Priority: Minor
> Fix For: UNDEFINED FUTURE
>
>
> 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. - You can reply to this email to add a comment to the issue online.
This archive was generated by hypermail 2.0.0 : Tue Dec 25 2007 - 17:49:12 EST