Skip to content

v4.0.51模型多对多关联超过一定数量报错 #847

Description

@skyselang

会员表ya_member:member_id,nickname;
会员标签表ya_member_tag:tag_id,tag_name;
会员标签关联表ya_member_attributes:id,member_id,tag_id;

模型多对多关联查询

$list  = $model->with($with)->page($page)->limit($limit)->append($append)->hidden($hidden)->group($group)->order($order)->select()->toArray();

当limit等于300是正常的;超过300的时候会报错(具体数值未知,因为分页数量设置了只能选...300,500,800,1000):

SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'tag_id' in where clause is ambiguous;

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