BelongsToManyRepository
BelongsToManyRepository 是用于处理 BelongsToMany 关系的 Relation Repository。
不同于其他关系类型,BelongsToMany 类型的关系需要通过中间表来记录。
在 NocoBase 中定义关联关系,可自动创建中间表,也可以明确指定中间表。
类方法
find()
查找关联对象
签名
async find(options?: FindOptions): Promise<M[]>
详细信息
查询参数与 Repository.find() 一致。
findOne()
查找关联对象,仅返回一条记录
签名
async findOne(options?: FindOneOptions): Promise<M>
count()
返回符合查询条件的记录数
签名
async count(options?: CountOptions)
类型
findAndCount()
从数据库查询特定条件的数据集和结果数。
签名
async findAndCount(options?: FindAndCountOptions): Promise<[any[], number]>
类型

