-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Saving aggregate #42
Comments
Good point. |
Thanks for your quick answer, but if we look more general.... aggregate saving, the whole aggregate (all stackoverflow and other articles on the web out there), is fishy for me :). Basically for this to work you shoud mix repository with logic, as in standard module->controller->service. Otherwise keeping logic in aggregate only you should "tell" somehow to the repository to save the exact fields that needs to update, maybe rows to insert, delete. Do you have some suggestion on this ? |
TypeOrm |
Hi, your code is a true source of inspiration regarding ddd, lots of explanations, great job!
In your code there is only save and delete for the user. For update I have some issues regarding saving/updating the aggregate.
Using typeorm(in the end) the save/update method would update all aggregate(step 1) properties (not only the changed ones).
If we have two requests that change two different properties(firstName, lastName) and the first request has some delay/more work/etc, that means that the last request would be overwritten by the first. ( Somehow the repo shoud save only what changed in the aggregate?)
Thanks,
The text was updated successfully, but these errors were encountered: