[6.x] Only restore common relations#32613
Merged
taylorotwell merged 4 commits into6.xfrom Apr 30, 2020
Merged
Conversation
|
There is an error with |
Member
|
@oleksiyPetlyuk this should be fixed in the latest release. |
Member
Author
|
What exactly is getQueueableRelations returning for you? |
|
We are also seeing For us, $relations = $this->map->getQueueableRelations()->all();
dump($relations);Hope that helps |
Member
Author
|
OK Thanks that is helpful. Fixing now. |
|
Im using Laravel 6.18.12 |
Member
Author
|
Fixed on 6.18.13. |
Member
Author
|
Fixed on 7.10.1. |
|
Installed and fix confirmed in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #26126
We only want to restore relationships that are common amongst all models in the collection. Otherwise there will be errors be attempting to restore the collection.
One downside to this PR could be potential performance implications of getting the queueable relationships for each model in the collection. I did this in a collection of about 1000 models and it took 0.70ms on my local machine.