I’ve read an article from Vaughn Vernon where he states that aggregates should only reference each other by identity.
Lets say i have aggregate A which has a reference to the identity of aggregate B. I’d like to display a list containing aggregate A with some columns from aggregate B in my UI.
That would mean i have to query aggregate A first, then i’d have to query aggregate B with the reference from aggregate A.
This seems to be a N+1 problem, how could i solve this while respecting the “reference by identity” rule?