Skip to content
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

where binding expression does not support boolean value #464

Closed
erhuabushuo opened this issue Jun 8, 2021 · 2 comments · Fixed by #467
Closed

where binding expression does not support boolean value #464

erhuabushuo opened this issue Jun 8, 2021 · 2 comments · Fixed by #467
Labels
bug An existing feature is not working as intended

Comments

@erhuabushuo
Copy link
Contributor

erhuabushuo commented Jun 8, 2021

.where({
'vip': True
})

https://github.com/MasoniteFramework/orm/blob/1.0/src/masoniteorm/query/grammars/BaseGrammar.py#L625

why here ignore True binding. or we should just remove this.

@erhuabushuo erhuabushuo added the bug An existing feature is not working as intended label Jun 8, 2021
@erhuabushuo
Copy link
Contributor Author

erhuabushuo commented Jun 8, 2021

maybe we also need where_is('vip', True) , sql condition expression like where vip is true or where vip is false

@josephmancuso
Copy link
Member

josephmancuso commented Jun 10, 2021

This is fixed in version 1.0.49.

Depending on the database it will either do WHERE column = '1' or if using Postgres it will do the actual boolean value WHERE column IS True (on boolean columns)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An existing feature is not working as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants