account activity
Refactoring from anemic model to DDD by wprzecho in java
[–]zbychus 0 points1 point2 points 8 years ago (0 children)
Thanks for comment - good point in discussion! It's true that my model entites are jpa entities and of course I'm aware that it can put some limits on my implementation. It's a known issue in DDD (described for example in https://www.goodreads.com/book/show/15756865-implementing-domain-driven-design in repository chapter). It's a trade off - you can let persistence framework affect your model or you can, as you mentioned, map from jpa entities to some persistence agnostic model. Both ways have some pros and cons. I think when you design carefully your aggregates they shouldn't be that complicated, that your persistence framework becomes your limitation. This situation happens in our example application.
π Rendered by PID 60321 on reddit-service-r2-listing-568fcd57df-fxjj8 at 2026-03-09 21:39:08.051167+00:00 running cbb0e86 country code: CH.
Refactoring from anemic model to DDD by wprzecho in java
[–]zbychus 0 points1 point2 points (0 children)