You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Jeff cox <Je...@cwindustries.net> on 2003/04/01 05:19:09 UTC

project-schema.sql... DROP with casacade?

Hi,
	Just curious... is there a way to get 'CASCADE' appended to the
DROP statements in the generated DDL file. Most of my tables have
foreign keys associated with them, and thus fail to execute when running
the insert-sql build task. Alternativly, if there is a better way to
handle without using CASCADE, any help would be appreciated... 

Jeff



RE: project-schema.sql... DROP with casacade?

Posted by Jeff cox <Je...@cwindustries.net>.
Thanks... I have been useing Torque in 'jar' format, but I will unpack
it and then pack it back up... I knew it used Velocity templates, but I
guess I just didn't think about...

Cheers...

-----Original Message-----
From: CY Ing [mailto:cy.ing@iasolution.net] 
Sent: Tuesday, April 01, 2003 12:45 AM
To: Turbine Torque Users List
Subject: RE: project-schema.sql... DROP with casacade?

Torque uses Velocity to generate DLLs, which is based on SQL template
files.
For example, you can locate Oracle DROP template at
<torque>\templates\sql\base\oracle\drop.vm. It looks like this:

DROP TABLE $table.Name CASCADE CONSTRAINTS;
#if ($table.IdMethod == "native")
DROP SEQUENCE $table.SequenceName;
#end


Just modify to get what you need. When you done, regenerate the DDL and
see
what happens.

Regards.

-----Original Message-----
From: Jeff cox [mailto:Jeff@cwindustries.net]
Sent: Tuesday, April 01, 2003 11:19 AM
To: 'Turbine Torque Users List'
Subject: project-schema.sql... DROP with casacade?


Hi,
	Just curious... is there a way to get 'CASCADE' appended to the
DROP statements in the generated DDL file. Most of my tables have
foreign keys associated with them, and thus fail to execute when running
the insert-sql build task. Alternativly, if there is a better way to
handle without using CASCADE, any help would be appreciated...

Jeff



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org





RE: project-schema.sql... DROP with casacade?

Posted by CY Ing <cy...@iasolution.net>.
Torque uses Velocity to generate DLLs, which is based on SQL template files.
For example, you can locate Oracle DROP template at
<torque>\templates\sql\base\oracle\drop.vm. It looks like this:

DROP TABLE $table.Name CASCADE CONSTRAINTS;
#if ($table.IdMethod == "native")
DROP SEQUENCE $table.SequenceName;
#end


Just modify to get what you need. When you done, regenerate the DDL and see
what happens.

Regards.

-----Original Message-----
From: Jeff cox [mailto:Jeff@cwindustries.net]
Sent: Tuesday, April 01, 2003 11:19 AM
To: 'Turbine Torque Users List'
Subject: project-schema.sql... DROP with casacade?


Hi,
	Just curious... is there a way to get 'CASCADE' appended to the
DROP statements in the generated DDL file. Most of my tables have
foreign keys associated with them, and thus fail to execute when running
the insert-sql build task. Alternativly, if there is a better way to
handle without using CASCADE, any help would be appreciated...

Jeff



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org