Skip to content

Conversation

@mitchierichie
Copy link
Contributor

The docs state that

"The limit and take query builder methods may not be used when constraining eager loads."

However, in multiple tests, these methods did work.

Is the doc too ambiguous and I misunderstood it? Or is this warning outdated and needs to be removed?

I understood it to mean that the relationship that's being eager loaded can't be limited, i.e., all related rows will be returned, no matter what. However, when I use limit, it returns no more than the limit specified.

I can't open an issue in this repo, so I made a PR instead, removing this warning.

@taylorotwell
Copy link
Member

It may not be working as thoroughly as you think.

Here is some history on the warning: #4918

@mitchierichie
Copy link
Contributor Author

It may not be working as thoroughly as you think.

Here is some history on the warning: #4918

Thanks for the added context.

@mitchierichie mitchierichie deleted the patch-1 branch December 14, 2023 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants