- 
                Notifications
    
You must be signed in to change notification settings  - Fork 11.6k
 
Open
Description
Laravel Version
12.0
PHP Version
8.4
Database Driver & Version
SQLite
Description
The whereNotMorphedTo function seems to not support sqllite. I think this should work since sqlite is a supported database. It is related to this operator: "<=>"
Steps To Reproduce
Create two models (video and comments). Comments morphs to video. Now try to call the whereNotMorphedTo and you will get this error:
SQLSTATE[HY000]: General error:   1 near ">": syntax error (Connection: sqlite, SQL: select * from "hostnames" where not (("hostnames"."hostnameable_type" <=> App\Models\ServiceOdoo and "hostnames"."hostnameable_id" in (  37))) and "hostnames"."deleted_at" is null)
Example of calling:
use App\Models\Comment;
use App\Models\Video;
$video = Video::first();
Comment::whereNotMorphedTo('commentable', $video)->get();Metadata
Metadata
Assignees
Labels
No labels