laravel-mongodb icon indicating copy to clipboard operation
laravel-mongodb copied to clipboard

Fix MYSQL Many To Many relation when try to detach

Open nouraraar91 opened this issue 4 years ago • 1 comments

right now when implementing the relationship Many-to-Many with MySql, all is working but when trying to detach from the MySQL model an error BadMethodCallException with message 'Call to undefined method App\Models\User::pull()' is showing because that MySQL model is not a collection and can't use pull on it

so I added a check to see if the model is a mongo collection or not and then will call the pull method similar issues: #2002

I am not sure how I should create a Pull request here, I couldn't push my branch to create the PR

nouraraar91 avatar Feb 18 '21 12:02 nouraraar91

after pushing your branch in your fork, github automatically suggests create PR to this repo

Smolevich avatar Feb 21 '21 06:02 Smolevich