allow calling create, update, delete with a disabled unitOfWork#140
Merged
allow calling create, update, delete with a disabled unitOfWork#140
Conversation
badaz
approved these changes
Mar 6, 2024
Contributor
badaz
left a comment
There was a problem hiding this comment.
I don't really understand why we would prevent creating, updating, deleting with a disabled unitOfWork in the first place? So I'm quite ok with this
potlaetitia
approved these changes
Mar 6, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #94
Copying from here:
We might want to deactivate the unitOfWork when we don't care about the result of the
create,updateordeletemethod.Imagine a call that does fetch a item:
later, we do have a modal that allow to change the name, but we don't care about the return
The unitOfWork will register the data with only the
@id.If later call a "type changer":
The
getDirtyDatawill return that only the@idis known, and then send a call with:We might want to disable the unit of work when "updating", as we do disable it for find method (a put is "just" a get that change some data before).