[WIP] - CS-5982 - Deleting section with many articles from backend fails#1370
Open
takeit wants to merge 2 commits intosourcefabric:v4.4from
Open
[WIP] - CS-5982 - Deleting section with many articles from backend fails#1370takeit wants to merge 2 commits intosourcefabric:v4.4from
takeit wants to merge 2 commits intosourcefabric:v4.4from
Conversation
| $batch = 30; | ||
| $steps = ($articlesCount > $batch) ? ceil($articlesCount / $batch) : 1; | ||
|
|
||
| for ($i = 0; $i < $steps; $i++) { |
Contributor
There was a problem hiding this comment.
it's not better do this with doctrine native query and hydrate to array or event run a DELETE query? Or ->delete() does to much magic?
Contributor
Author
There was a problem hiding this comment.
check line 211, it invokes delete on \Article object, where inside that method it removes all the associations to that article, geo maps, webcodes, images, topics, article data etc, this would then require a huge refactor I guess
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.
No description provided.