| Summary: | drop table fails if constraints changed | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | James Sutherland <jamesssss> | ||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||
| Status: | NEW --- | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | tom.ware | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
James Sutherland
One partial solution is to attempt to drop all of the tables several times. This will hopefully remove the tables with constraints and allow the other tables to be dropped. This will work most of the time, but if a table was removed and still exists on the database and has a constraint on an existing table, it still will not be able to be dropped. cascade constraints, is another option, but this is only supported by Oracle. another option may be to query the database metadata, this may be a good long term solution as it could also be used in create-tables to do nothing if the table already exists, and will be required for alter support. Created attachment 197968 [details]
patch to drop tables several trys
Changing target - missed 2.4.1 release. I added cascade constraints for Oracle, but still need solution of other dbs. DB2 always cascades constraints, so is ok. The JPA 2.1 Spec gives a workaround... Downgrading. The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |