Changes between Initial Version and Version 1 of Ticket #34346, comment 5


Ignore:
Timestamp:
Feb 17, 2023, 5:13:16 PM (19 months ago)
Author:
Mohamed Nabil Rady

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34346, comment 5

    initial v1  
    11I am not that familiar with the codebase so I can't make any promises, so I guess it's for the best to leave another person with the bug.
    22
    3 I found out the issue happens because before the regression in `django.db.models.sql.compiler.SQLCompiler.get_order_by` would return a `Col` object, but it now it returns `Ref` object which points to the correct column but its `as_sql` method returns the annotated value name instead of the unambiguous SQL.
     3I found out the issue happens because before the regression in `django.db.models.sql.compiler.SQLCompiler.get_order_by` would return a `Col` object wrapped inside an `OrderBy` object, but it now it returns `Ref` object wrapped in an `OrderBy` object which points to the correct column but its `as_sql` method returns the annotated value name instead of the unambiguous SQL.
    44
    55I am not sure to what extent is this information useful or if it's obvious, but as I said I am not that familiar with the codebase, and I am not sure what `Ref` objects are responsible for.
Back to Top