3 ms·
No, of course you would maintain a Set<Customer> as well (possibly even a Map<Customer, Account Set> for efficiency).
by Smaug123 6y ago
No, of course you would maintain a Set<Customer> as well (possibly even a Map<Customer, Account Set> for efficiency).
- monocasa 6y agoTheir whole premise is that > Customers rely on Accounts (I.e. have one or many). I'm giving a domain relevant counter example to that premise. And interestingly enough, that leads you to a clean way of modeling it without the cyclic dependency as you've just done.
- ImprobableTruth 6y ago... if you model it that way you're not using cyclic dependencies at all and this is in fact exactly how you would model it in a functional way.