You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ambiguous table aliases from SQLQueryEngine.toSQL().
Expected Behavior
No ambiguity generated.
Current Behavior
Currently, in SQLQueryEngine.toSQL() method, we are generating table aliases based on class name only, this would cause ambiguity when we have a relationship like tb1.country.country. As country shows up twice in this query, the generated aliases would be ambiguous.
Possible Solution
Maybe the table alias should contain the information from the path like user.country, such as
select*from user join country AS user_country ON ...
There are multiple solutions we can try.
Testing
Add data model that would cause ambiguity and make unit tests and integration tests for it.
The text was updated successfully, but these errors were encountered:
Ambiguous table aliases from
SQLQueryEngine.toSQL()
.Expected Behavior
No ambiguity generated.
Current Behavior
Currently, in
SQLQueryEngine.toSQL()
method, we are generating table aliases based on class name only, this would cause ambiguity when we have a relationship liketb1.country.country
. As country shows up twice in this query, the generated aliases would be ambiguous.Possible Solution
Maybe the table alias should contain the information from the path like user.country, such as
There are multiple solutions we can try.
Testing
Add data model that would cause ambiguity and make unit tests and integration tests for it.
The text was updated successfully, but these errors were encountered: