loopback where field is null

▼魔方 西西 提交于 2019-12-11 15:56:39

问题


How can I query a field which is null? I get a a sql error

filter=[where][category_id][eq][null] results in

SELECT WHERE category_id'null' ORDER BY id

using latest version of loopback and loopback-connector-mysql


回答1:


You can use filter like

/model?filter[where][category_id][eq]=null

As you see in loopback

/medias?filter[where][keywords][inq]=foo&filter[where][keywords][inq]=bar

reference link : here



来源:https://stackoverflow.com/questions/52485321/loopback-where-field-is-null

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!