top-think/think

模型多对多关联的中间表如何作为查询条件?

mkinit opened this issue · 1 comments

我有一个文章表、分类表,中间表(post_id,category_id),是通过多对多关联的,当我查询文章列表的时候,需要指定分类id时怎么查询?只能用视图查询吗?