Skip to content
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

T15098 Mvc\Model delete cascade relations with params #15126

Merged
merged 9 commits into from
Sep 9, 2020

Conversation

zsilbi
Copy link
Member

@zsilbi zsilbi commented Aug 2, 2020

Hello!

In raising this pull request, I confirm the following:

  • I have read and understood the Contributing Guidelines
  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • I have updated the relevant CHANGELOG

Small description of change:

Modified Mvc\Model::_checkForeignKeysReverseCascade() to use Models\Manager::getRelationRecords() when deleting related records.
Added tests for: Mvc\Model::getRelated() and Mvc\Model::delete() to ensure the params option is used properly when accessing and deleting related models.

Thanks,
zsilbi

@zsilbi
Copy link
Member Author

zsilbi commented Aug 2, 2020

I have a fix for this (#15098) for the 4.0.x branch as well, you can find it here: https://github.com/zsilbi/cphalcon/tree/T15098-related-cascade-delete

@zsilbi zsilbi force-pushed the T15098-related-cascade-delete-4.1.x branch from 419bc02 to 354ed04 Compare August 3, 2020 14:45
Copy link
Member

@ruudboon ruudboon left a comment

Choose a reason for hiding this comment

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

Looks good to me. Giving the rest team a day or two to review as well otherwise I'll merge this for the 4.1 release.

@Jeckerson Jeckerson added 4.1.0 bug A bug report labels Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Delete related records without considering additional conditions/params
4 participants