Quantcast
Channel: User Filip Milovanović - Software Engineering Stack Exchange
Viewing all articles
Browse latest Browse all 164

Comment by Filip Milovanović on Aligning domain model to data model. Is my data representation wrong?

$
0
0
If you're never really going to need the metadata in isolation, treat the Order as an aggregate, and just have a save_order method on your repo that accepts a (domain layer) Order instance (which itself has a Metadata instance), and then transform your data and store both. Same when loading, but in reverse (and you probably want to load a number of objects based on some query, not just one).

Viewing all articles
Browse latest Browse all 164

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>