#1 2025-06-20 14:05:22

FatimaEzzahraa14
Member
Registered: 2024-11-22
Posts: 9

Atomic Transaction Handling for Multiple Related Entities in SOA

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

#2 2025-06-20 20:04:13

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,069
Website

Re: Atomic Transaction Handling for Multiple Related Entities in SOA

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

Board footer

Powered by FluxBB