diff --git a/src/Database/Traits/Multisite.php b/src/Database/Traits/Multisite.php index a8675882a..ffedcf315 100644 --- a/src/Database/Traits/Multisite.php +++ b/src/Database/Traits/Multisite.php @@ -200,7 +200,7 @@ protected function defineMultisiteRelation($name, $type = null) } // Override the local key to the shared root identifier - if ($type === 'belongsToMany') { + if (in_array($type, ['belongsToMany', 'morphedByMany', 'morphToMany'])) { $this->$type[$name]['parentKey'] = 'site_root_id'; } elseif (in_array($type, ['belongsTo', 'hasOne', 'hasMany'])) {