strongloop / loopback

LoopBack makes it easy to build modern applications that require complex integrations.
http://loopback.io
Other
13.23k stars 1.2k forks source link

Where operators in PersistedModel.find() #535

Closed ian-lewis-cs closed 8 years ago

ian-lewis-cs commented 10 years ago

Hi,

I cannot find any information on how to filter by IS NULL.

http://docs.strongloop.com/display/LB/Where+filter#Wherefilter-Operators

Example:

SELECT foo 
FROM baz
WHERE  bar IS NULL

Any suggestions?

Many thanks, Ian

ritch commented 10 years ago

Have you tried this MyModel.find({where: {bar: null}}, console.log)?

ian-lewis-cs commented 10 years ago

Hi @ritch

I tried that but without success, it was an intuitive choice. Thanks for the suggestion though.

Cheers, Ian

raymondfeng commented 10 years ago

What database?

ian-lewis-cs commented 10 years ago

Hi,

mySql is the target database.

Thanks

superkhau commented 9 years ago

@ian-lewis-cs Has the issue been resolved? Can I close it?

Also, please post questions to https://groups.google.com/forum/#!forum/loopbackjs. See https://github.com/strongloop/loopback/wiki/Reporting-issues#question for more details.

ritch commented 8 years ago

Closing due to inactivity. Please ping @superkhau to re-open