Subject Re: [IBO] Pessimistic locking and Triggers
Author Geoff Worboys
> Is there a way to avoid firing Update triggers (and
> so to maintain DATA_M to null) when doing inserts
> with PessimisticLocking activated?

Update triggers should not be firing during an insert and neither
should pessimistic locking be called. So I suspect your problem is
not related to the pessimistic locking settings.

You must be inserting and then updating. This can happen in
master/detail arrangements where IBO will automatically post a new
master record but leave the dataset in an apparent insert state so
that detail items can be created. When you eventually post the master
in this situation it will actually perform an update, which could be
when your update trigger is being activated.

I think you will have to examine your requirements to find an
alternative approach. For example...

* If you specifically want to mark items that are updated from the
client application, then you can implement specific update of the
DATA_M field at the client just when the update is posted.

* If the update can be detected via other fields (or perhaps other
records) then you can update your trigger to detect those changes and
set the field.
DATA_M = ...
so if SomeField has been set then DATA_M will be initialised. Once
DATA_M has been initialised it will update with every update.

Just thoughts, I dont know what your requirements are.

Geoff Worboys
Telesis Computing