Dynamoid / dynamoid

Ruby ORM for Amazon's DynamoDB.
MIT License
580 stars 195 forks source link

Fix .import and mark attributes of persisted models as not changed/dirty #628

Closed andrykonchin closed 1 year ago

andrykonchin commented 1 year ago

After importing models their attributes were still marked as dirty despite the fact that the changes are saved.

Example to illustrate:

users = User.import([{}])
users[0].changes? # => true
github-actions[bot] commented 1 year ago

Code Coverage

Package Line Rate Health
dynamoid 90%
Summary 90% (2755 / 3055)

Minimum allowed line rate is 90%

codecov[bot] commented 1 year ago

Codecov Report

Merging #628 (4daa35a) into master (77f956b) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #628   +/-   ##
=======================================
  Coverage   90.17%   90.18%           
=======================================
  Files          60       60           
  Lines        3053     3055    +2     
=======================================
+ Hits         2753     2755    +2     
  Misses        300      300           
Impacted Files Coverage Δ
lib/dynamoid/persistence/import.rb 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.