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 add support for Django 4.2 to pass the current test.
In Django 4.2 the SQL of a CTE is build but the columns are automatically asigned an alias this cases the CTE references to fail. This commit attempts to choose beter column aliases so they match the CTE names.
ie Unlike Django using col1, col2 for un-aliased columns we use the same as the field name.
Whist this passes the test it is a invasive set of changes, i did think i'd manages a ultra simple set of changes
The test added is to ensure we don't break the column renaming fix in django 4.2. As the simple removal with_col_aliases in #66 (comment) does to make django_cte pass it test
Fixes: #66