FIX Don't make a count query when threshold = 0#11646
Merged
GuySartorelli merged 3 commits intosilverstripe:5.3from Apr 8, 2025
Merged
FIX Don't make a count query when threshold = 0#11646GuySartorelli merged 3 commits intosilverstripe:5.3from
GuySartorelli merged 3 commits intosilverstripe:5.3from
Conversation
This is a partial fix for silverstripe#11645
Contributor
Author
|
@GuySartorelli I also took the opportunity to avoid setting the limit of items if threshold is 0. I'm not even sure why the threshold value is used as the lazy load limit, as this seems two different things |
This was referenced Aug 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a partial fix for #11645
It avoids count queries when dropdown_field_threshold is set to 0
Everything will work the same as before, but with a very small difference: empty tables will now lazy load, but I think that's acceptable
It will also prevent setting a limit of 0
Description
See issue for context
Manual testing steps
Set the dropdown_field_threshold to 0
See that no more count queries are made during scaffolding
Issues
#11645
Pull request checklist