In one of the products I work with we have an aggregation root with a lot of domain logic, and now I have a requirement to make one small piece of behavior configurable.
To give an example, let's say I have an entity and this entity has many schedules, these schedules tells me if they are on time or not and they have different ways of doing that according to their type (polymorphism), one of these specifications needs to take into account a database configurable parameter giving me the result.
Now, all of the possibilities I thought doesn't seems right
It doesn't makes sense to remove domain logic from the domain just because of this requirement.
Also there's no way for the Entity to access a repository, at least not one considered right by DDD
I thought of a lot of other ways of solving that, but I always end up having to manually instantiating the repository inside the entity or having my application layer to inject this configuration values by property which breaks the design since there's no way of forcing the value to be injected before a method that may use it being called.
What alternatives do I have here?