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

Fix HasOneSql their field update hook #1037

Merged
merged 2 commits into from
Jul 23, 2022

Conversation

mvorisek
Copy link
Member

The hook was updating our model using SQL query, which was dangerous as all validation/normalization/hooks were skipped. I checked the rest of the atk4/data code, and thankfully, all similar dangerous updates were already migrated to materiazed update.

One of dangerous behaviour was described in atk4/filestore#26.

The hook conditions are still not right and I will fix them in another PR. Thus this PR does not fix the filestore issue, but prevents any related data corruption to happen - if mismatched data are given, an exception is thrown.

@mvorisek mvorisek merged commit 231547f into develop Jul 23, 2022
@mvorisek mvorisek deleted the fix_hasone_their_table_update_hook branch July 23, 2022 12:28
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.

1 participant