-
Notifications
You must be signed in to change notification settings - Fork 155
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
Aggregate Root References Each Other #8
Comments
"An aggregate root only can give reference each other by id" is wrong, aggregate root is a object ,object only can reference other objects, not their id. |
I'm directly referencing from Vaughn Vernon's book "Implementing Domain Driven Design": RULE: REFERENCE OTHER AGGREGATES BY IDENTITY
Also, we know that an aggregate is a transactional boundry. Composing aggregate objects might give ability to modify inner aggregate from parent and it might cause inconsistency. |
I don't aggree with Vaughn Vernon, aggregate root object is business object ,is not any entity of ORM or database, ORM and database belongs to Infrastructure layer. Clean architecture/Hexagonal architecture is better choice of ""Implementing Domain Driven Design"". |
In DDD, there is a strict rule that says "An aggregate root only can give reference each other by id". In your system ForumMessage aggregate root contains another aggregate root which is ForumThread.
The text was updated successfully, but these errors were encountered: