You are not logged in.
I have a function in SOA that contains 3 parts, each part performs an Add/Update on an entity (we have 3 entities).
In part 2, there is an entity that has a foreign key to entity 1.
In this function, we need to perform Add/Update on all 3 entities, but if a problem occurs with any of these entities, all the modifications made in this function must be rolled back.
What is the appropriate solution for this problem?
Offline
Don't store anything until you have all content in synch.
Read the mORMot 1 documentation about the "aggregate" issue.
TL&WR:
Do not put the consistency logic in the database itself, but in your business logic.
Offline