Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DDD - Share or duplicate a value object to be used between two aggregate roots?

If I have a payment value object can it be shared by two different aggregate roots? or should I duplicate it?

Both options feel wrong!

like image 502
Cool Breeze Avatar asked Nov 27 '14 02:11

Cool Breeze


1 Answers

As long as your VO is immutable, you can share it without any issues. However, Evans prohibits sharing mutable VOs and I think you will also agree with that.

like image 153
plalx Avatar answered Sep 29 '22 16:09

plalx