From 6839c9436f73b5e16eeed8c95e7cc9b23e2f860d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Klabbers?= Date: Thu, 24 Mar 2022 00:34:51 +0100 Subject: [PATCH] missed another prefix for tests --- framework/core/src/Post/Post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/src/Post/Post.php b/framework/core/src/Post/Post.php index 8c508aa9a..8c72f6c53 100644 --- a/framework/core/src/Post/Post.php +++ b/framework/core/src/Post/Post.php @@ -98,7 +98,7 @@ class Post extends AbstractModel $db = static::getConnectionResolver(); $post->number = new Expression('('.$db ->table('posts', 'pn') - ->whereRaw('pn.discussion_id = '.intval($post->discussion_id)) + ->whereRaw($db->getTablePrefix().'pn.discussion_id = '.intval($post->discussion_id)) ->select($db->raw('max('.$db->getTablePrefix().'pn.number) + 1')) ->toSql() .')');