Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eager loading and N + 1 issue #2928

Closed
iSarCasm opened this issue Sep 18, 2017 · 1 comment
Closed

Eager loading and N + 1 issue #2928

iSarCasm opened this issue Sep 18, 2017 · 1 comment
Milestone

Comments

@iSarCasm
Copy link

I have two models:

class ActiveTour < ApplicationRecord
  ...
  rails_admin do
    edit do
      field :tour_hotels do
        eager_load true
      end
    end
  end
  ...
class TourHotel < ApplicationRecord
  ..
  rails_admin do
    edit do
      field :hotel do
        eager_load true
      end
    end
  end
  ...
end

When I access http://localhost:3000/admin/active_tour/4/edit I get the bullet warning saying: USE eager loading detected TourHotel => [:hotel] Add to your finder: :includes => [:hotel]

How can I fix this?

@ziaulrehman40
Copy link

Any solution so far?

@mshibuya mshibuya added this to the 3.0.0 milestone Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants