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

2010-09-25 Thread Thomas Fischer (JIRA)

[ 
https://issues.apache.org/jira/browse/TORQUE-45?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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-unsubscr...@db.apache.org
For additional commands, e-mail: torque-dev-h...@db.apache.org



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

2006-07-17 Thread Joe Carter (JIRA)
[ 
http://issues.apache.org/jira/browse/TORQUE-45?page=comments#action_12421574 ] 

Joe Carter commented on TORQUE-45:
--

So how are tables with circular references dropped?

Whatever the root cause, the underlying fault remains, in that you cannot use 
the generated SQL
to drop and re-create tables when foreign keys are present.

Is this a reasonable requirement?

 Generated SQL is in wrong order when dropping tables on table re-creation
 -

 Key: TORQUE-45
 URL: http://issues.apache.org/jira/browse/TORQUE-45
 Project: Torque
  Issue Type: Bug
  Components: Generator
Affects Versions: 3.2, 3.1.1
 Environment: java 1.4.2, 1.5. Solaris 10.
Reporter: Joe Carter

 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.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2006-07-17 Thread Thoralf Rickert (JIRA)
[ 
http://issues.apache.org/jira/browse/TORQUE-45?page=comments#action_12421580 ] 

Thoralf Rickert commented on TORQUE-45:
---

 So how are tables with circular references dropped? 

I have this circular references problem in one of my schemes. And my solution 
is to drop the whole database. 

This isn't a problem in a development environment (it's faster) and later in a 
production environment you don't drop tables.


 Generated SQL is in wrong order when dropping tables on table re-creation
 -

 Key: TORQUE-45
 URL: http://issues.apache.org/jira/browse/TORQUE-45
 Project: Torque
  Issue Type: Bug
  Components: Generator
Affects Versions: 3.2, 3.1.1
 Environment: java 1.4.2, 1.5. Solaris 10.
Reporter: Joe Carter

 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.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2006-07-17 Thread Anonymous (JIRA)
[ 
http://issues.apache.org/jira/browse/TORQUE-45?page=comments#action_12421585 ] 


 So how are tables with circular references dropped? 
In some databases, there is the cascade constraints option to thge drop 
table command which drops the constraints associated with the dropped table. 
In other databases, I assume one would have to drop the constraints first and 
then the tables.

 Generated SQL is in wrong order when dropping tables on table re-creation
 -

 Key: TORQUE-45
 URL: http://issues.apache.org/jira/browse/TORQUE-45
 Project: Torque
  Issue Type: Bug
  Components: Generator
Affects Versions: 3.2, 3.1.1
 Environment: java 1.4.2, 1.5. Solaris 10.
Reporter: Joe Carter

 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.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]