Skip to content

Added onCondition and where condition for the FK delete queries #55

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

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

deadmantfa
Copy link

#54 Fixes
Fixed random deletion of data due to not honouring the onCondition and where condition

@sime15
Copy link

sime15 commented Feb 15, 2018

@deadmantfa Seems like this fix works in the manner that it prevents related records from being deleted, but now deleting related records doesn't work at all.

Seems like issue is caused by commenting out code in 98ab3c8

Edit: Sorry, my bad, doens't work just when you delete all related records, and is not caused by commenting code in previously mentioned commit.

@deadmantfa
Copy link
Author

@sime15 Yes I agree, but that code deleted everything which was not sent it. For example if there are 5 relations and only the parent and 2 relation data was updated the next 3 would be deleted which was not by design when I as using it i.e. ver 1.1.6 I worked on that code and fixed the issue first and created a mess for myself where we lost a lot of data. Thank god for backups ;P so I commented out that code as i did not need it. But It was not there in the original PR request. This is my first time contributing with a PR. So any guidance would be great.

📝 (README.md): update documentation for clarity and additional features
♻️ (RelationTrait.php): refactor code for better readability and maintainability
⬆️ (composer.json): update PHP version requirement and add asset-packagist repository
…to avoid redundancy with actual return type declarations

🔧 (composer.json): add rector/rector as a development dependency to facilitate automated code refactoring

🔧 (rector.php): add configuration file for Rector to set up paths and code quality levels for automated refactoring
…y code structure and improve readability

🔧 (rector.php): increase type coverage, dead code, and code quality levels to 40 to enhance code robustness and maintainability
…arison for better readability and performance

🔧 (rector.php): increase type coverage, dead code, and code quality levels to 70 for stricter code analysis and improvement
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