Subject | RE: [firebird-support] Transaction Context and Triggers |
---|---|
Author | Alan McDonald |
Post date | 2006-03-30T09:42:10Z |
> On 30 Mar 2006 at 16:09, Alan McDonald wrote:no - no SP involved, insertions are produced by client app into master, with
>
> >but recently I see that it is possible to get the insertion into the
> >log table out of this sequence so the log table records an insertion
> >to the child sometimes before it records an insertion into the parent.
> >This reverse sequence is obviously not possible into the child first
> >since it would (does) raise an FK exception.
>
> Is it possible that insertion into child table is done by trigger
> on master table (or by any SP called from the trigger) and this
> trigger is fired before logging trigger?
>
> --
> SY, Dimitry Sibiryakov.
master PK previously acquired, then child with the same PK master value as
it's FK. Each after insert trigger is from the same protoype and applied to
all tables regardless of table relationships. The server FK constaints
protect the tables well enough during client application insertions and the
triggers fire as expected but they seem to acquire the logtable gen values
not in the same sequence as the client app produces the key table inserts.
Alan
I imagine that if I did this in separate transactions, this wouldn;t show up
but, of course that defeats the purpose of the transactions