You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the 'join' clause of find_all() and other finder methods accepts a single model class. For greater profit, we should also accept a list of model classes, to be joined in sequence.
Today, in order to fully expand the relationships:
Summary
Currently, the
'join'
clause offind_all()
and other finder methods accepts a single model class. For greater profit, we should also accept a list of model classes, to be joined in sequence.Today, in order to fully expand the relationships:
we can only invoke
'join'
on one model, e.g.Product
, and then expand onBrand
andShop
separately, in an expensive O(n) loop:The following call would yield the same result:
A more concise form would also save us the additional nested
belongs_to(Brand::class)
:What the former means is:
Purchase
withProduct
andShop
Product
withBrand
resulting into a similar query:
The text was updated successfully, but these errors were encountered: