Skip to content
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

Introduce Aggregate Root, Entity, ValueObject, DomainEvent abstracts #374

Open
hantsy opened this issue Nov 23, 2023 · 0 comments
Open

Introduce Aggregate Root, Entity, ValueObject, DomainEvent abstracts #374

hantsy opened this issue Nov 23, 2023 · 0 comments

Comments

@hantsy
Copy link

hantsy commented Nov 23, 2023

In Eric's DDD, a Repository is tightly tied with Aggregate Root, and used to maintain the lifecycle of a Aggregate Root. And a Aggregate Root could be consist of Entity, Value Objects, and can handle domain events. Have a look at jmolecules project: https://github.com/xmolecules/jmolecules/tree/main/jmolecules-ddd/src/main/java/org/jmolecules/ddd/types

In a JPA, it is easy to maintain the lifecycle like relation between PurchaseOrder and OrderItems, but switching to Jdbc(assume there is a data-jdbc module), it should apple changes to the whole Aggregate when calling a repository save/update etc.

@otaviojava otaviojava added this to the Jakarta Data Future milestone Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants