Closed michaellperry closed 6 years ago
Use j.fact to create a new fact that has an unsaved predecessor. For example:
j.fact
j.fact({ predecessor: { value: 'Never seen before', root: { value: 'This one already existed' } }, value: 'Brand new, too' }
The client generates two save requests to the server. The second includes the predecessor, so the first was not necessary.
The client should collect the entire tree of facts that it is attempting to save, and issue just one save call to the server.
The client application was explicitly calling j.fact twice. Jinaga is correctly optimizing the save requests if the application calls j.fact once.
save
Reproduction steps:
Use
j.fact
to create a new fact that has an unsaved predecessor. For example:Outcome
The client generates two save requests to the server. The second includes the predecessor, so the first was not necessary.
Expected behavior
The client should collect the entire tree of facts that it is attempting to save, and issue just one save call to the server.