Searched the internet for this but even straight googling of this topic does not give anything related.
I would like the answers to be general programming answer rather than language or framework specific.
So in a repository pattern, how do you do relationships? Eager by default? Query if needed (kind of lazy load)? Have extra methods in repo?
StudentRepo which I think is the best example... would you
First one seems dirty to me. What if you needed a nested relationship?
Eager load by default seems dangerous on some cases kind of 50/50 to be used a solid solution.
Those are the only solution solutions can think of. There might be some answers out there. How do you solve this?
Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.