db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Klein" <matth...@cmklein.de>
Subject ON DELETE CASCADE
Date Wed, 13 Jul 2005 17:05:24 GMT
How can I implement something like ON DELETE CASCADE with Torque?

Like: let's say table BOOK references table AUTHOR through a relation WROTE.
Now let's say I have BOOK_ID 1 and AUTHOR_ID 1 and AUTHOR_ID 2 (because the
book was written by 2 authors).
Then I have the following WROTE:

BOOK_ID   AUTHOR_ID
1         1
1         2

But now let's assume I wish to delete the book.

With SQL I simply create the table WROTE with ON DELETE CASCADE so once I
delete the book, the database also deletes all references (e.g. in WROTE)

How can I do that with Torque?

Thanks

Matt


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


Mime
View raw message