> > BUT the insertion in the table "log" in "fire" is done BEFORE the > insertion in XXX.
How do you know? AFTER INSERT is still running in the transaction. I'd guess (and I know almost nothing about this) that your "log" table insert is occurring in a different transaction that commits before the main one. On Wed, 6 Feb 2019 at 22:18, vincent burban <[email protected]> wrote: > Hello, > > We have a problem with Triggers. > > We have created a Trigger that must fire after an insertion in the XXX > table. > > we declared the trigger in base with: "CREATE TRIGGER > Trigger_Synchro_INSERT_XXX *AFTER INSERT* ON XXX FOR EACH ROW CALL > xx.xxxxx.xxxx.GenericSynchroTrigger" > > In this trigger we try to log some insertions in the XXX table. For this, > the trigger makes an insertion in a "log" table. > > The trigger fires. The code in the "init" then "fire" methods of > GenericSynchroTrigger is triggered, the "before" parameter of "init (...)" > is false. BUT the insertion in the table "log" in "fire" is done BEFORE > the insertion in XXX. > > What is it? How to cure it ? > > *Thank you for your help.* > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/h2-database. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
