You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default on before and on after events are not called within the CRUD transaction, unless added (and removed) Explicitly.
This is to keep the duration of the transaction as short as possible, especially if time consuming operations are done.
The way we add a on before or on after event in transaction is by always having an on before / on after pair, creating the transaction on before and leaving it on after. In GO it is done with the EnsureDataAccessAdaptor and DisposeAccessAdaptor methods.
But that's cumbersome. To make sure we dispose the transaction, we have to call the on after method in a catch block, in case there is an exception sent before reaching the regular on after. Better to find a better way that's no so much error prone.
Maybe a way to define as part of the extension definition if it should be part or not of the transaction. Or add 2 events to have separates extension point wether we want or not to be part of the transaction
The text was updated successfully, but these errors were encountered:
See ticket #254
By default on before and on after events are not called within the CRUD transaction, unless added (and removed) Explicitly.
This is to keep the duration of the transaction as short as possible, especially if time consuming operations are done.
The way we add a on before or on after event in transaction is by always having an on before / on after pair, creating the transaction on before and leaving it on after. In GO it is done with the EnsureDataAccessAdaptor and DisposeAccessAdaptor methods.
But that's cumbersome. To make sure we dispose the transaction, we have to call the on after method in a catch block, in case there is an exception sent before reaching the regular on after. Better to find a better way that's no so much error prone.
Maybe a way to define as part of the extension definition if it should be part or not of the transaction. Or add 2 events to have separates extension point wether we want or not to be part of the transaction
The text was updated successfully, but these errors were encountered: