StaticAddAdds the update refusal (on updateField) or, for a new row, the row's own problems (on rowField) to result.
rowProblems runs only when the write is not an update of a saved version.
StaticAdoptA version-1 row is its own lineage root: on create the server assigns LineageRootID = ID, because a client
cannot choose the ID it will be given. Any other row is left as it is.
StaticFailRecords a failure on field and marks the result failed.
StaticGetThe refusal for a ReplayOnly save of a saved row of entityName. Pure.
StaticGetThe refusal for a write to a saved row; null for a new row or a saved row with no change. A row of a versioned
lineage (it has a LineageRootID) is told to save the next version; a row with no lineage (a Training Snapshot) to
write a new row. Pure.
StaticIsEvery MJ data provider is also a metadata provider; a test double may not be. Narrows without a cast so the Predictive Studio server subclasses can use metadata lookups only when the provider supports them.
StaticLoadVersion version of a lineage, read with ReadOneRow.
StaticPreviousVersion n - 1 of a lineage with its parsed form: null for version 1; undefined when it could not be read, is
absent (versions are consecutive) or does not parse, each recorded on result against Version.
StaticReadThe first row of entityName matching filter, as a plain row (nothing is mutated). A failed read is returned as
its error, so it is never reported as an absent row.
StaticSaveRuns save (the subclass's base save) unless this is a ReplayOnly save of a saved row, which is refused with
GetReplayOnlyUpdateProblem recorded on the result history (so LatestResult.CompleteMessage carries it).
ReplayOnly skips Validate() but still writes, and it writes even when no field is dirty (values loaded with
LoadFromData are not dirty), so the option itself is refused on a saved row rather than its dirty fields judged.
A ReplayOnly insert goes through, as it does for every entity.
The immutable-version guard shared by the unit, protocol and snapshot subclasses: one implementation of "a saved version is never updated", so the three entities cannot drift apart. It holds on both write paths: an ordinary save is refused in
Validate()(AddProblems), and aReplayOnlysave, which skipsValidate(), inSave()(SaveRefusingSavedRowReplay). A delete is not refused: the integration rigs and the plan's probes delete the rows they create, and the foreign keys keep a version that anything references.Which user. The unit, protocol and pipeline subclasses judge authorship and read other rows as
ActiveUser: the user the save is attributed to (ContextCurrentUser, else the provider'sCurrentUser), whichBaseEntity.Save()checks permissions for and hands the provider's write. The coding standard's "useBaseEntity.ContextCurrentUserrather than tracking the current user" is about not keeping a user of one's own;ActiveUseris that same BaseEntity resolution, finished.ContextCurrentUseralone is only an explicitly set user: an entity created without one is written as the provider's user, and readingContextCurrentUserwould judge, and read as, no user instead.