-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Closed
Description
Laravel Version
11 It might even exist from version 6
PHP Version
8.2
Database Driver & Version
postgres
Description
Hi team,
First of all thanks for this illuminated framework, found a bug for PostgreSQL update
DB::table('post')
->leftJoin('post_history', function ($join) {
$join->on('post_history.post_id', '=', 'post.id');
})
->where('post_history.post_status', postStatus::assigned)
->update([
"post.last_comment" => DB::raw("post_history.comments")
]);
This query is working in Laravel 5.8, after migrating to laravel 11 this is not working
probably this commit
make the above code unusable
Steps To Reproduce
Create the following table in any postgres database
post table with id, comment, last_comment
post_history table with id, post_id, post_status, comments
fill both tables with some record
run the code below
DB::table('post')
->leftJoin('post_history', function ($join) {
$join->on('post_history.post_id', '=', 'post.id');
})
->where('post_history.post_status', postStatus::assigned)
->update([
"post.last_comment" => DB::raw("post_history.comments")
]);
Metadata
Metadata
Assignees
Labels
No labels