The record this plan is rooted at.
ReadonlyRootThe record the plan is rooted at — the entity whose Save() / Delete() was called.
How many operations this plan will perform.
A count of 1 means the plan is just the root record, and BaseEntity takes its ordinary
single-record path — no plan execution, no transaction scope, byte-for-byte the behavior
that existed before companions. This is what keeps the overwhelmingly common case free of
any new cost or risk.
The nodes in execution order.
Appends a node to the plan.
The unit of work to append.
This plan, for chaining.
Convenience wrapper over Add for a delete node.
The record to delete.
Origin label used in error messages.
This plan, for chaining.
Composes a callback onto the root node's Prepare. Later callbacks run after
earlier ones. Used to stamp an owner-held FK after the embedded node has
assigned its primary key.
Applied immediately before the root node executes.
Convenience wrapper over Add for a save node.
The record to save.
Origin label used in error messages.
Optionalprepare: () => voidOptional callback applied immediately before the node executes.
This plan, for chaining.
Convenience wrapper over InsertBeforeRoot for a save node.
Optionalprepare: () => voidInserts a node immediately before the root. Used by owner-held embeddeds: the peer must persist (and receive its PK) before the owner stamps the FK.
The unit of work to insert.
This plan, for chaining.
An ordered set of record operations that must succeed or fail together.
Built by
BaseEntity.BuildSavePlan()/BuildDeletePlan(), which seed the root node and then let each companion contribute viaEntityCompanion.ContributeSaveWork()/ContributeDeleteWork().Remarks
Ordering is explicit and positional — nodes execute in the order they were added. Companions that need their work to run before the parent (deletions of children, for instance) add it before the parent node exists, which is why
ContributeDeleteWorkis called first on the delete path andContributeSaveWorklast on the save path.