From 85b63681ae228b9c2e6ac509c666bdde78c5fab7 Mon Sep 17 00:00:00 2001 From: Rafael Horvat Date: Tue, 21 Mar 2023 11:32:23 +0100 Subject: [PATCH] Fix: Integrity constraint violation: 1052 Column 'id' in where clause is ambiguous (#3772) --- .../mentions/src/Listener/UpdateMentionsMetadataWhenVisible.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/mentions/src/Listener/UpdateMentionsMetadataWhenVisible.php b/extensions/mentions/src/Listener/UpdateMentionsMetadataWhenVisible.php index 267636b78..7a7c4f19c 100755 --- a/extensions/mentions/src/Listener/UpdateMentionsMetadataWhenVisible.php +++ b/extensions/mentions/src/Listener/UpdateMentionsMetadataWhenVisible.php @@ -103,7 +103,7 @@ class UpdateMentionsMetadataWhenVisible $post->unsetRelation('mentionsGroups'); $users = User::whereHas('groups', function ($query) use ($mentioned) { - $query->whereIn('id', $mentioned); + $query->whereIn('groups.id', $mentioned); }) ->get() ->filter(function (User $user) use ($post) {