-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Commit builder API - linking resources to commits #24
Comments
It might also make sense to give Resource instances a CommitBuilder. So when some data manipulation method is called on a resource, a Commit will be instantiated. Only when So perhaps a Resource has an |
The current implementation of |
I think I need to convert |
Or... Instead of the above, where resource methods implicitly call |
The |
A (temporary) fix is calling a similar method from the Store, instead of from the Commit. This method ( |
Atomic Commits describe how a resource is to be mutated. A Commit might mean the resource should be removed, it might mean some fields will be added, it might mean a single field is changed.
Constucting these Commits should be simple. Ideally, developers should not have to deal with commits - they should simply call "destroy" on some instance and it should be removed accordingly.
However, sometimes developers will need to manually create these commits. For example if a developer tries to batch various changes instead of sending the commit after a single change.
This asks for a nice API for building / constructing these commits.
The text was updated successfully, but these errors were encountered: