--

Absolutely!

ArrayCollection is a class from a tool, from Doctrine. Colleciton interface itself has the same story - using it in the Domain layer is a mixture of layers.

This is a price we have to pay when using Doctrine. I don't know how to overcome this dependency (yes, we may annotate the typehit as array, but we would lie).

Thruth is that non-functional requirements influences our model, and technical limits may influence our model.

We can find a clean way to this issue, but if the clean way is slow and overcomplicated, I presonally am able to accept that choose of tool influenced the domain model.

In other words I accept that model reflects used tool if it has a reason. The reason is that Doctrine is a tool that helps a lot with persistence.

--

--

Svaťa Šimara
Svaťa Šimara

Written by Svaťa Šimara

Developer interested in Domain-Driven Design & Modeling

No responses yet