mongodb / laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel (Moloquent)

Home Page:https://www.mongodb.com/compatibility/mongodb-laravel-integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BelongsToMany sync does't use configured foreign key

GromNaN opened this issue · comments

I guess there is an other issue with this call. It should be $ids = $this->parseIds($ids); also. Otherwise it's getting the model _id instead of the relatedKey.
Do you want to add an other test with a customized relatedKey? That will require a new model class for tests, but will ensure we use the correct ID field.

Originally posted by @GromNaN in #2648 (comment)