Obtain an update that captures every mutation made by the app to the domain since the domain was last updated. The update should be immediately written to the m-ld engine. This method also REVERTS the mutations made in the app code. This is because the updates will be very quickly re-applied, having been processed by the m-ld engine, in the next update cycle.
Allows the caller to wait for any active updating state to go out of scope, so that the app is free to mutate ORM subjects without risk of faults. This method can be used to protect any code that is called asynchronously, such as an event handler in a user interface.
Call to obtain an updating state of the domain, to be used to create or load ORM subjects.
a readable m-ld core API state
a procedure that uses the updating state – the given updating state is guaranteed to remain valid until the returned promise settles.
Since read operations like traversal of graph edges are asynchronous in m-ld, an ORM domain can be in an "updating" state, in which some edge may not be fully loaded (sometimes called a "fault"). This mode is entered using the updating method. It gives access to an OrmUpdating state, from which graph content can be loaded. An updating state is required to create new subject instances attached to the domain object (also since their properties may need loading).
Mutations of the graph by the app MUST NOT be done in an updating state (a subject property that is not yet loaded could have an unexpected value of
empty; and the app mutation may be overridden by an asynchronous load). An exception to this is setting the initial properties of a new subject. Changes to a subject, or to the whole ORM domain, can be committed to a writeable m-ld state.