I'm building a small pricing engine but in order to organize the business logic, I'm trying to follow DDD concepts.
I'm facing an interesting situation. To simplify my code, I'm relying on db function to join/process data extracted from various table. For instance, I have a function that will calculate the daily schedules of a "centre". The output of this function is not really an entity (no real id) and the associated repository does not support create/update/delete features.
Similarly, I use a function to calculate the basic resource pricing (list the resource, check the price for each time range...).
In the end, I have the feeling my repository is returning an object containing a list of value objects.
As far as I know repositories should return aggregates, themselves containing entities so I'm wondering if I'm doing something "wrong" or if I'm missing few DDD concepts here.
Thx for your help, Sebastien
Aucun commentaire:
Enregistrer un commentaire