简体   繁体   中英

where filter returns empty array in Loopback3

I have model named franchise form which I want to fetch data based on franchise name. My query is

{"where":{"company_name":"test"}}

The strange thing is sometimes the filter works properly but sometimes it returns an empty Array. I am using loopback3 .

If you're using MongoDB set this flag "strictObjectIDCoercion": true in the options object of your [model].json file.

Answer is explained here: https://github.com/strongloop/loopback/issues/3593#issuecomment-379353913

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM