LoopbackJS: HasAndBelongsToMany, how to query/filter by property of relation?
问题 I'm currently working on my first Loopbackjs project and am facing a seemingly simple issue: Let's say I have a model "Post" and a model "Tag". A Post has and belongs to many tags. Now I need to list all posts with specific tags. I just can't figure out how to create a query with Loopback that achieves this. I thought it would work something like this, but it doesn't: Posts.find( {where: {tag.id: {inq: [1, 4]}}} ); I would greatly appreciate any help. 回答1: It's not as easy as it should be to