Skip to content

How to use wthCount, withSum and so on #63

@smilelanss

Description

@smilelanss

Hi @sunel
$organizations = OrganizationEav::withCount('comments' )->get();
withCount don't work.
Is there a solution to this problem?

error
SQLSTATE[08P01]: <<Unknown error>>: 7 ERROR: bind message supplies 11 parameters, but prepared statement "pdo_stmt_00000013" requires 13 (SQL: select (select count(*) from "comments" where "organizations"."id" = "comments"."commentable_id" and "comments"."commentable_type" = organization and "status" = PUBLISHED and "parent_id" is null) as "comments_count"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions