代码之家  ›  专栏  ›  技术社区  ›  RSA

环回过滤器“where and”在任何值中返回错误/相同的结果

  •  1
  • RSA  · 技术社区  · 8 年前

    这是loopback docs中关于使用 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\u id。 此外,post\u id和user\u id是关系Objectid。

    1 回复  |  直到 8 年前
        1
  •  1
  •   Raymond Camden    8 年前

    取下过滤器,只需使用where。(感谢雷蒙德·冯(RaymondFeng)的帮助。)

    推荐文章