db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henning P. Schmiedehausen" <...@intermeta.de>
Subject Re: mySQL --> CASCADE DELETE
Date Mon, 20 Sep 2004 08:37:27 GMT
"Ben Bookey" <ben.bookey@gistec-online.de> writes:


well, it won't make you happy, but that is how it works on
e.g. PostgreSQL.

Torque uses the onDelete="cascade" attribute only for the SQL
generation and relies on the database to do the actual cascade.

>Dear List,

>I am trying to create a cascade delete foreign key reference for mySQL
>database sql script, using Torque 3.0.2, but it doesnt generate the correct

>I have taken a look at the mySQL template vm velocity files, but can not
>find any mention of "cascade delete".

I looked at the Torque 3.1 tree and cascades are only supported for
oracle, postgresql and sapdb (as far as I can see).

The MySQL support is pretty much on the 3.23 level when the database
engine had no cascading delete support. The problem with MySQL is,
that the supported language has been greatly extended in 4.x.

So yes. I think you're out of luck for MySQL > 3.23 ATM. Sorry. 

Patches welcome (but they must keep backwards compatiblity; so you
probably would need to introduce a new database type, e.g. mysql4,
based on mysql.


><foreign-key foreignTable="main" onDelete="cascade">
>  <reference
>		local="ID_main"
>		foreign="ID_main"/>

>Could anyone tell me if this is supported by Torque and the mysql db driver.


>Ben Bookey

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

Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

"Fighting for one's political stand is an honorable action, but re-
 fusing to acknowledge that there might be weaknesses in one's
 position - in order to identify them so that they can be remedied -
 is a large enough problem with the Open Source movement that it
 deserves to be on this list of the top five problems."
                       -- Michelle Levesque, "Fundamental Issues with
                                    Open Source Software Development"

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

View raw message