Skip to content

count() 方法在多对多条件查询distinct()后,会返回所有的数,不是distinct()后实际的数量 #2178

@FatXiaoBai

Description

@FatXiaoBai

Describe the bug
多条件复合查询,含多对多查询,调用distinct()后再使用count()统计数

To Reproduce
应该为distinct()后打印出来的实列数

Expected behavior
实际返回了所有多对多的匹配结果,没有去处重复

Additional context
python3.12
tortoise-orm[asyncpg]==0.25.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions