File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -834,7 +834,9 @@ public function updateRelationship(
834834 throw new DatabaseException ('Collection or related collection not found ' );
835835 }
836836
837- $ junction = $ this ->getNamespace () . '_ ' . $ this ->filter ('_ ' . $ collectionDoc ->getSequence () . '_ ' . $ relatedCollectionDoc ->getSequence ());
837+ $ junction = $ side === Database::RELATION_SIDE_PARENT
838+ ? $ this ->getNamespace () . '_ ' . $ this ->filter ('_ ' . $ collectionDoc ->getSequence () . '_ ' . $ relatedCollectionDoc ->getSequence ())
839+ : $ this ->getNamespace () . '_ ' . $ this ->filter ('_ ' . $ relatedCollectionDoc ->getSequence () . '_ ' . $ collectionDoc ->getSequence ());
838840
839841 if (!\is_null ($ newKey ) && $ key !== $ newKey ) {
840842 $ this ->getClient ()->update ($ junction , updates: $ renameKey , multi: true );
You can’t perform that action at this time.
0 commit comments