Open rbergm opened 6 years ago
First steps have been taken here: 226e69fe71af56503ffd3df128fc3dbead33cbf9
Actually it is not necessary to make the profiles immutable. Instead they could just notify their related person about the changes performed. This would also solve some weird usages of the resulting API. Copying a person would also cause issues with the way Spring handles domain events.
Moving classes which are not directly related to persons to the more general model
package here b59acd4698b2ab5f7f54d1c38d8aaa78ec13dccd and d98ff6a3834d70da957155520e17edfea85ff152
What we are missing right now
A person should act as aggregate-root for its various profiles. Therefore these should be made immutable. This change would also enable a more elegant distribution of events such as the update of a person's data (See #29). Dedicated
update(...)
methods should be introduced and make the inner workings of mangers more clear and easy to understand. Futhermore these managers are better placed inside their correspondingmodel
packages rather than in a separateapp
package. As the profiles will be immutable it will be their job to update the profiles accordingly. This would also solve the issue of updating entities through "dark magic". Last but not least the usage for four different manager classes should be re-evaluated and most likely be replaced by a single one.