SeaQL / sea-query

🔱 A dynamic SQL query builder for MySQL, Postgres and SQLite
https://www.sea-ql.org
Other
1.12k stars 182 forks source link

join_as constructs invalid sql join #782

Open MichaelCClary opened 3 months ago

MichaelCClary commented 3 months ago

Description

When using join_as, it assigns the alias to the join table, but doesn't use the alias on the join condition which results in an invalid join.

It shows an incorrect join in the example/test.

Steps to Reproduce

Expected Behavior

image

Actual Behavior

image

Reproduces How Often

Every time

Versions

sea_query -"0.30.7"

Additional Information