feat: add feature flag to control usage of query optimizations #759
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.
Context
I've encountered several issues with the query optimizations:
has_oneassociations is invalid (it's currently trying to select the foreign key from the main record's table) resulting in errors when rendering the view or exporting the view to CSVI've attempted to fix some of these issues myself, but I ended up realizing that the gem code needs extensive refactoring (and added test coverage) and unfortunately I don't have the necessary time to spend on it.
These query optimizations are breaking changes, and have prevented us from upgrading the gem since the version
9.11.3, so my suggestion is to allows us to use the gem without the query optimizations (which we know it is at least functional).Definition of Done
General
Security