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 is using too many bindings #248

Closed
josephmancuso opened this issue Nov 29, 2020 · 0 comments · Fixed by #251
Closed

Eager Loading is using too many bindings #248

josephmancuso opened this issue Nov 29, 2020 · 0 comments · Fixed by #251
Labels
bug An existing feature is not working as intended

Comments

@josephmancuso
Copy link
Member

When eager loading it is calling the bindings for every model in the collection when it should just be pulling the unique ids

SELECT * FROM `users` WHERE `users`.`id` IN (%s, %s, %s, %s, %s, %s), ('1', '1', '1', '1', '1', '1')

It should pluck as well as call unique() when eager loading in the query builder class

@josephmancuso josephmancuso added the bug An existing feature is not working as intended label Nov 29, 2020
@josephmancuso josephmancuso mentioned this issue Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An existing feature is not working as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant