-
Notifications
You must be signed in to change notification settings - Fork 123
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 Col is Null #441
Comments
Hi, @blalan05, This should work today - please make sure that the Check it and let me know |
Version 0.26.12
|
Wait... This is working as expected, my data was saving as empty string instead of null... is there a way to match empty string/ or falsey? |
You can use the Or you can use the saving hook to map that: |
Great! Is there something I can do to remove the type error when doing this? |
Can you reproduce the typing error, I want to investigate it. Try reproducing it here: |
https://stackblitz.com/edit/github-bxxyjv?file=src%2Fshared%2Fmodel.ts,src%2FApp.tsx Error replicated. |
To be honest, in these cases I do |
Did this workout for you? |
I haven't seen |
useEffect(() => {
taskRepo
.find({
limit: 20,
orderBy: { createdAt: 'asc' },
where: { title: null! }, //here
})
.then(setTasks)
}, []) |
Is your feature request related to a problem? Please describe.
I've got a table with parentId which is a self relationship, I would like to be able to select just the parents.
Describe the solution you'd like
with .find({ where: { parentId: null } }) or .find({ where: { $isNull: parentId } }) or similar
Describe alternatives you've considered
I tried with parentId: undefined... and that returns all rows. I've looked through source code and API has isNull options, but its not available to FindOptions or related types.
The text was updated successfully, but these errors were encountered: