【问题标题】:LoopBack filter "where and " return wrong/same result in any valueLoopBack 过滤器“where 和”返回错误/相同的结果为任何值
【发布时间】:2018-01-30 00:38:31
【问题描述】:

这就是环回文档中关于使用 and 运算符的内容

休息: ?filter[where][and][0][title]=My%20Post&filter[where][and][1][content]=Hello

我试过了:

count?filter{"where":[{"and"}[{"user_id":"5a6840ddb2b58b07cca3c680"},{"post_id":"4444"}]} //post_id:4444 is not exit

count?filter[where][and][0][user_id]="5a6840ddb2b58b07cca3c680"&filter[where][and][1][post_id]="5a6253bdcf975122dcf11dd8"

和许多其他形式 但结果是 count: 12 但应该在 4444 中返回 0 或任何错误的 post_id。 另外,post_id 和 user_id 是关系 Objectid。

【问题讨论】:

    标签: node.js rest loopbackjs strongloop


    【解决方案1】:

    删除过滤器,只使用 where。 (感谢 Raymond Feng 帮我解决这个问题。)

    【讨论】:

    • 亲爱的@raymond-camden,非常感谢,这让我很累。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-01-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-17
    • 1970-01-01
    • 2021-10-14
    相关资源
    最近更新 更多