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
Tt seems it's not possible to preload associations (didn't find it in the docs, code and github issues), but it would be highly valuable for e.g. belongs_to associations. Example:
Product.all.map(&:company).map(&:uuid).to_a it requests each company individually (typical N+1 issue). It would be nice to be able to Product.preload(:company).map(&:uuid).to_a such that the companies are loaded with a single query like usually the case when using ActiveRecord. Maybe i miss something.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
Hi!
Tt seems it's not possible to
preload
associations (didn't find it in the docs, code and github issues), but it would be highly valuable for e.g.belongs_to
associations. Example:When i do:
Product.all.map(&:company).map(&:uuid).to_a
it requests each company individually (typical N+1 issue). It would be nice to be able toProduct.preload(:company).map(&:uuid).to_a
such that the companies are loaded with a single query like usually the case when using ActiveRecord. Maybe i miss something.Thanks in advance.
The text was updated successfully, but these errors were encountered: