You are not logged in.
Pages: 1
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?
TSynUniqueIdentifierGenerator — in which unit is it located?
Is it possible to give me an example that explains how to use TRestBatch to insert 3 objects, where I need to get the ID of the first object and use it in the second object?
As part of a 3-tier architecture (SOA), I need to implement a business function that operates on three different ORM classes, each corresponding to a different table in the database.
My goal is to ensure data consistency by using a transaction: if an error occurs while saving any of the entities, I want all changes to be rolled back.
However, in mORMot 2, the TransactionBegin(Table, SessionID) method appears to support only one class at a time.
Therefore, I am wondering:
How can I manage a transaction that spans multiple ORM classes (tables) in mORMot?
Does using transactions in mORMot block other users from accessing or modifying the database during the transaction?
yes , i use it , how to fix ID instead of RowID
When I connect to an external database like PostgreSQL, when using the MultiFieldsValues function, it returns RowId instead of ID.
why
want to extract the elements that do not have a key.
is that possible?
I am using the Objects property of IdocList.
For example:
var dL: IdocList;
for var d: IdocDicts in dl.Objects('Name=', '')
I found that it skips the d objects that do not have a 'Name'."
It seems like you're trying to iterate through an IdocList and filter or process objects based on their 'Name' property, but the issue is that objects without a 'Name' are being skipped.
exampel :
var dcTest : TDcoVariantData
dcTest := Doc.InitArray([
Doc.InitObject(['test', 14]),
Doc.InitObject(['test', 41])
]);
who to check if the value of 'test' equals 41 in DocVariantData.
Pages: 1