Skip to content

Scope joinReactionCounterOfType not working when used with select #253

Open
@thanhtoan1196

Description

@thanhtoan1196

Scope joinReactionCounterOfType not working when used with select
Logs:

Comment::select('comments.name')->joinReactionCounterOfType('Like')->orderBy('reaction_like_count', 'desc')->get();

Illuminate\Database\QueryException  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'reaction_like_count' in 'order clause' (Connection: mysql, SQL: select `comments.name` from `comments` left join `love_reactant_reaction_counters` as `reaction_like` on `reaction_like`.`reactant_id` = `comments`.`love_reactant_id` and `reaction_like`.`reaction_type_id` = 2 order by `reaction_like_count` desc).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions