New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Crash in use of aliased OpBoolean #1631
base: main
Are you sure you want to change the base?
Conversation
After fussing with the code I have an alternative which would simplify this significantly, but it involves restructuring Expression and ExpressionWithColumnType to be interfaces; I can easily see it being a breaking change for users. |
Thank you for a PR. I think it would be better to resolve it in a more generic way for all ExpressionAliases by making a recursive call to |
That actually makes a lot of sense as well and you're probably right. It might be worth performing a check in ExpressionAlias's init block that the delegate is not itself an alias; the only downside I could think of is some sort of bizarre multiple nesting aliases scenario, but I can't think of an SQL where that would be legal anyway. |
btw just want to note that I really like what you've done here--I'm just sorry that I probably can't use it in my job because we have a number of devs who are opposed to any ORM tool that doesn't prioritize working with raw SQL. |
@Tapac Something like this?
|
Selecting aliased comparison results blows up (in mariadb/mysql, anyway) trying to cast an int to a boolean. This corrects that issue.