You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by "Thomas Fischer (JIRA)" <ji...@apache.org> on 2010/09/25 21:50:32 UTC

[jira] Commented: (TORQUE-45) Generated SQL is in wrong order when dropping tables on table re-creation

    [ https://issues.apache.org/jira/browse/TORQUE-45?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12914870#action_12914870 ] 

Thomas Fischer commented on TORQUE-45:
--------------------------------------

The solution does not work for foreign keys to external schemata because the external schema table is defined in another sql file than the foreign key. But in my eyes this is acceptable.

> Generated SQL is in wrong order when dropping tables on table re-creation
> -------------------------------------------------------------------------
>
>                 Key: TORQUE-45
>                 URL: https://issues.apache.org/jira/browse/TORQUE-45
>             Project: Torque
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 3.1.1, 3.2
>         Environment: java 1.4.2, 1.5. Solaris 10.
>            Reporter: Joe Carter
>             Fix For: 4.0
>
>
> When the table creation SQL is re-run when the schema contains foreign keys, you will get referential integrity complaints.
> This is because the table drop order means that it tries to drop dependent tables first.
> To fix this, the drop statements should be before all the creates. They should also be in reverse order to the creates.
> A method to be able to obtain the tables in reverse order will be needed to allow the templates to be modified to fix this.

-- 
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: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org