I’ll tell you how, with icings/partitionable
!
If you ever wanted to limit your hasMany
or belongsToMany
associations, just to realize that when you set a limit()
in the association’s query builder, the overall number of associated records is being limited instead, leaving you sad and disappointed, on the edge of losing your faith in humanity, then you might want to check out that small library, it transparently integrates into the ORM layer, and uses the well known association setup syntax.
It’s not stable yet, everything is subject to change, especially the various filter strategies. Any feedback is welcome, being it here, or on GitHub.