Skip to content

Fix collections attachments. #889

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 2, 2016
Merged

Fix collections attachments. #889

merged 2 commits into from
Sep 2, 2016

Conversation

mlanin
Copy link
Contributor

@mlanin mlanin commented Jul 7, 2016

If you will try to attach model simultaneously to a collection of related models, you'll crash your app, because this method will try to operate with models themselves but not with their ids.

This change considers every case and fixes collections relations.

@pi0
Copy link
Contributor

pi0 commented Sep 1, 2016

There are breaking changes on master so unitTests are failing. would you please follow This steps to rebase this PR with master branch and running UnitTests against latest changes ?

Thanks :)

mlanin and others added 2 commits September 2, 2016 16:04
If you will try to attach model simultaneously to a collection of related models, you'll crash your app, because this method will try to operate with models themselves but not with their ids.

This change considers every case and fixes collections relations.
@mlanin
Copy link
Contributor Author

mlanin commented Sep 2, 2016

@pi0 Thanks!

@pi0
Copy link
Contributor

pi0 commented Sep 2, 2016

@jenssegers please check this out :) thanks :)

@jenssegers jenssegers merged commit 467949f into mongodb:master Sep 2, 2016
mnphpexpert added a commit to mnphpexpert/laravel-mongodb that referenced this pull request Sep 2, 2024
* Fix collections attachments.

If you will try to attach model simultaneously to a collection of related models, you'll crash your app, because this method will try to operate with models themselves but not with their ids.

This change considers every case and fixes collections relations.

* Fix typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants