db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Dudgeon <tdudg...@informaticsmatters.com>
Subject Re: trigger with cascade delete problem
Date Thu, 12 Jun 2014 17:31:11 GMT
Hi Rick,

So much as I expected. Its probably not a bug, and working exactly as 

So my question is how to get the behaviour I want!
I can't use a BEFORE trigger as that doesn't let me delete rows (which 
is my real use case - the example is a gross simplification).
I need to do a join to get the data I need, but the join depends on 
something that has just been deleted because this is an ON DELETE triger.


> Hi Tim,
> This result looks correct to me. The trg_delete2 trigger fires AFTER the
> deletion and inside the same transaction. So it sees the state of the
> MAIN table AFTER the banana tuple was deleted. From its perspective, the
> banana table should not appear in the join.
> Or did I misunderstand your question?
> Hope this helps,
> -Rick

View raw message