How to query models by a property that is an array

这一生的挚爱 提交于 2019-12-03 17:16:15

As far as I understood, possibility of such kind of a query depends on the underlying datasource and is not supported yet for relational DBs. But should be fine with memory storage or mongodb. More details and syntax for query is here: https://groups.google.com/d/msg/loopbackjs/8c8kw8EMiPU/yev3lsmrTFUJ

guptron

For anyone else who lands here, that query in your model is correct (for Mongo anyways).

{where:{favoriteLetters:'a'}

Reference:

Find document with array that contains a specific value

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