db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Preben Mikael Bohn <pre...@chin.dk>
Subject Re: Delete with cascade...
Date Thu, 22 Oct 2009 12:17:53 GMT
Hi Sylvain

> Derby supports cascade delete as part of the referential action specified at
> table's creation time.
> Then, when using a DELETE statement to remove row(s) from the referenced
> table, the DELETE operation is propagated to the dependent table. Here is an
> example:

OK, I see...

The problem though is that I don't know the structure of the tables
and I need to do a batch delete of several tables. I could of course
go through each of the tables and manually find dependent tables but
since I have to do this over and over again during development where
the table structure changes significantly (automatically generated by
Hibernate) this is really not an option...

On the other hand I could go over all the tables and try to delete
them in a loop until all data are deleted (although some delete
statements would still fail)... That would probably do the trick...
:-)

Best regards Preben

Mime
View raw message