I have a project in SailsJs, using waterline with a mongodb database. I have some fields defined, which are not required fields. I need to search records where that field is not defined. For example:
{id: 10, name: "jj"}
{id: 11, name: "kk", surname: "sr"}
I want to search where surname is not defined. Anybody has a clue how to do this?
I have tried
{surname: null}
{surname: ''}
Nothing produces the desired result.
I think what you want is Model.find( {where: {surname: null } }) Check out this link to Waterline Query language documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With