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
I have the following use case:
After creating, updating or deleting a record, my code needs to use this update to calculate and update another part of the model.
The database needs to be entirely up to date to calculate these correctly.
From the docs, it seems that either writing a custom adaptor or using an output hook is the way to go.
However, both are called during a transaction. At that stage, however, the database is not up to date. Hence calculations break.
I could use the client available to do an intermediate commit -which I do currently-, but this feels like a hack undermining the framework. Also, the database is not super happy when processing "COMMIT" statement not linked to a transaction. (Which seems to always happen in fortune when finishing the database operation)
So, is there a way to tackle this? If it needs an API extension, we have time for that.
Thanks for the advice
The text was updated successfully, but these errors were encountered:
Hi,
I have the following use case:
After creating, updating or deleting a record, my code needs to use this update to calculate and update another part of the model.
The database needs to be entirely up to date to calculate these correctly.
From the docs, it seems that either writing a custom adaptor or using an output hook is the way to go.
However, both are called during a transaction. At that stage, however, the database is not up to date. Hence calculations break.
I could use the client available to do an intermediate commit -which I do currently-, but this feels like a hack undermining the framework. Also, the database is not super happy when processing "COMMIT" statement not linked to a transaction. (Which seems to always happen in fortune when finishing the database operation)
So, is there a way to tackle this? If it needs an API extension, we have time for that.
Thanks for the advice
The text was updated successfully, but these errors were encountered: