4 ms·
That's the thing your persistence adapter is a separate thing to your domain. You can implement it however you want.
by UK-AL 9y ago
That's the thing your persistence adapter is a separate thing to your domain.
You can implement it however you want.
- Chyzwar 9y agoYour domain representation is your data. How you store/interact with your data will depends on storage. You cannot decouple this unless you create adaptor with only lowest common denominator. How you will create an adaptor that support transaction for both Mongo and Oracle? Answer: You don't because Mongo do not support transaction. This is like fridge and bookshelf. Both provide storage but cannot be used interchangeably. What would be adaptor for bookshelf to store meat?
- UK-AL 9y agoWell it isn't usually much of problem in DDD because between aggregates eventual consistency is used. Only for a single aggregates is all work is expected to fully completed for an action which mongo is fully capable of.