newdayrising
newdayrising

Reputation: 3802

Does LLBLGen wrap a recursive save in a transaction by default?

When saving an entity with related entities in LLBLGen, will it automatically wrap the DB calls inside a transaction, or could some portion of the save fail while other portions succeed?

Upvotes: 1

Views: 648

Answers (2)

Frans Bouma
Frans Bouma

Reputation: 8357

Recursive saves are always wrapped in a transaction. Single saves are only wrapped into a transaction if the entity is in a TPE inheritance hierarchy. Otherwise the single INSERT/UPDATE statement isn't wrapped into a transaction as it is already a transaction (atomic unit) on its own.

Upvotes: 1

user293957
user293957

Reputation:

Yes, when saving an Entity and it's related entities, using the recurse flag, it should encapsulate the calls into a single transaction.

Upvotes: 0

Related Questions