Skip to content

find option where with many-to-many #7210

@hezhongfeng

Description

@hezhongfeng

Issue Description

how to use option where to find many-to-many Relations?

user and product is many-to-many relations,Now I want to find some users IN product [1, 2, 3]

    let [users, total] = await this.userService.findAll({
      relations: ['info', 'products', 'roles'],
      where: {
        products: {
          id: In([1, 2, 3]),
        },
      },
    });

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions