question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

$ne doesn't work with null

See original GitHub issue

Describe the bug Try to filter some entities where some field isn’t null. Obvious query will be

find<Entity>(Entity, {field: { $ne: null }})

But typings doesn’t allow it and generated query is also wrong. Seems the only workaround is to use use $and with combination with $not that looks too boilerplated.

Any suggestions?

Versions

rc5

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
henrrogacommented, May 2, 2021

Hello, is this fixed?

1reaction
B4nancommented, Jan 9, 2020

Will be fixed in next RC.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Filter Query ne null doesnt work - Power Platform Community
Solved: I'm building a flow that pulls a spreadsheet into a list. However I cannot guarentee that the source spreadsheet (table) WON'T contain...
Read more >
Why does $ne comparison against null not work in a $filter ...
It is just the $ne that is not working. I am running this query on Mongo 4.4 series. First, see https://docs.mongodb.com/manual/tutorial/query- ...
Read more >
Mongo {$ne : null} not working as expected - Stack Overflow
I was able to reproduce the problem on MongoDB version 2.4.9. > db.sourceListings.findOne({displayed:{$ne:null}}); { <.. other stuff went ...
Read more >
NULL vs INITIAL - SAP Community
NULL values for a field means that physically nothing is stored. This only happend when a new table field is appended for an...
Read more >
PostgreSQL: IS NOT NULL - TechOnTheNet
If expression is a NULL value, the condition evaluates to FALSE. Example - With SELECT Statement. Here is an example of how to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found