This library relies heavily on the network, which makes it asynchronous throughout. Asynchronicity doesn't mix well with stateful operations such as withParent.
If withParent is called after that first line executes but before the second one does, it will overwrite the customer. If the await keyword appears between those two lines, that withParent call could be anywhere.
This library relies heavily on the network, which makes it asynchronous throughout. Asynchronicity doesn't mix well with stateful operations such as
withParent
.While this code will always work:
This code may be surprising:
If
withParent
is called after that first line executes but before the second one does, it will overwrite the customer. If theawait
keyword appears between those two lines, thatwithParent
call could be anywhere.The stateless variant does not have this issue:
This change is breaking. The next release will be 4.0.0.
withParent
was deprecated in 2018.