Skip to content

ComplexCriterion does not use aliases #673

Open
@MarkusShepherd

Description

@MarkusShepherd

It appears that ComplexCriterion ignores an alias attached to it. From the code I can see that other criteria have a signature like def get_sql(self, with_alias: bool = False, ...), but ComplexCriterion lacks that handling of with_alias.

Consequently, when I do something like

.select((criterion_1 | criterion_2).as_("my_alias"))

the SQL version will not include that my_alias.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions