Skip to content

[WIP] - CS-5982 - Deleting section with many articles from backend fails#1370

Open
takeit wants to merge 2 commits intosourcefabric:v4.4from
takeit:CS-5982
Open

[WIP] - CS-5982 - Deleting section with many articles from backend fails#1370
takeit wants to merge 2 commits intosourcefabric:v4.4from
takeit:CS-5982

Conversation

@takeit
Copy link
Copy Markdown
Contributor

@takeit takeit commented Apr 18, 2016

No description provided.

$batch = 30;
$steps = ($articlesCount > $batch) ? ceil($articlesCount / $batch) : 1;

for ($i = 0; $i < $steps; $i++) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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.

2 participants