Triggers are in an ArrayList in a table object.
So it seems to me there is definate order.
It would also seem logical that they are added to that list in the order they are created and fired in that same order.

So it would seem to me that the only place where this order could be shuffled is when the database is closed and table definition is persisted into a file and then when the db is reopened and read from the file.

Further it would seem that maintaining that order is the most natural thing to do.
So where is the order potentially shuffled?

- rami

On 24.5.2010 23:41, Rami Ojares wrote:
Passing data to triggers example seems to me a bit misleading.
It stores trigger instances to a static map variable
triggername -> triggerinstance

And this way it goes to store data into the instance.

But what I noticed is that more than one instance of a trigger is created so when the trigger is fired
it is a different instance to which I stored the data.

To fix this I just store data to a static map like this

triggername -> triggerdata

And then in fire method I can retrive the trigger related data.

I think triggers are implemented as instances (not static) because of some concurrency concerns.
Did I quess correctly?

Anyway I would really appreciate if Thomas, you could briefly comment something on my question
whether it is easy to enforce a determinate order on trigger execution.

Thanks,
Rami Ojares

--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to