Using mix of AND and OR clause in sails and waterline

后端 未结 3 1589
没有蜡笔的小新
没有蜡笔的小新 2021-01-14 11:22

How can I use OR and AND clause in Sailsjs and its ORM Waterline? For example I have a table of books

 _______________________________________
| book_name |          


        
3条回答
  •  猫巷女王i
    2021-01-14 11:51

      let booksResult=await Book.find().
                            where({author: "Author-1", 
                               or: [{ free: true  }, { public: true  }]
                            });
    
    

提交回复
热议问题