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 persisting attributes changed in-place #829

Merged
merged 2 commits into from
Dec 30, 2024

Conversation

andrykonchin
Copy link
Member

@andrykonchin andrykonchin commented Dec 30, 2024

The v3.9.0 release introduced a bug when in-place changes of attributes aren't detected and saved.

The issue affected in-place changes of string fields, modifying fields of compound types array/map/raw, serialized and custom types.

Example of in-place changing:

user = User.find('id')

user.name.upcase!
user.save

Example of modifying a field of compound type:

user = User.find('id')

user.settings[:namespace] = 'us-west'
user.save

Fixes #749, #814, #738, #666

Copy link

codecov bot commented Dec 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.56%. Comparing base (75a55b2) to head (37572d7).
Report is 51 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #829      +/-   ##
==========================================
+ Coverage   91.44%   91.56%   +0.12%     
==========================================
  Files          75       75              
  Lines        3645     3700      +55     
==========================================
+ Hits         3333     3388      +55     
  Misses        312      312              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andrykonchin andrykonchin force-pushed the ak/fix-saving-attributes-updated-in-place branch 2 times, most recently from 3fb32c9 to 230c28d Compare December 30, 2024 17:50
@andrykonchin andrykonchin force-pushed the ak/fix-saving-attributes-updated-in-place branch from 230c28d to e2cfbab Compare December 30, 2024 17:53
Copy link

Code Coverage

Package Line Rate Health
dynamoid 92%
Summary 92% (3384 / 3696)

Minimum allowed line rate is 90%

@andrykonchin andrykonchin merged commit 6f14c1e into master Dec 30, 2024
69 of 70 checks passed
@andrykonchin andrykonchin deleted the ak/fix-saving-attributes-updated-in-place branch December 30, 2024 18:18
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.

Not Functioning Correctly on Partial Updates of Serialized Fields
1 participant