Skip to content

fix(pinia-orm): Serialization was wrong with custom cast with custom serialization #1866

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

Merged
merged 6 commits into from
Jun 16, 2024

Conversation

Graphmaxer
Copy link
Contributor

@Graphmaxer Graphmaxer commented Jun 6, 2024

🔗 Linked issue

Resolves #1864

📚 Description

When updating an existing entry in a repository, the casts are not applied if the value is a class object with custom serlize.
Now $getAttributes() checks if an object has a custom serialize function which is then used.

@Graphmaxer
Copy link
Contributor Author

The fix 4ecf93f for $dirty is not working with this change

@CodeDredd
Copy link
Owner

Yeah your change will break $isDirty() for updating hooks. I need to look into it and think about an solution. Going to check out your branch

@CodeDredd CodeDredd changed the title Hydrate record on update fix(pinia-orm): Serialization was wrong with custom cast with custom serialization Jun 16, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.76%. Comparing base (ed747cb) to head (52a8844).
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1866   +/-   ##
=======================================
  Coverage   99.76%   99.76%           
=======================================
  Files          88       88           
  Lines        6032     6044   +12     
  Branches      512      515    +3     
=======================================
+ Hits         6018     6030   +12     
  Misses         12       12           
  Partials        2        2           

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

@CodeDredd CodeDredd merged commit 608f3dd into CodeDredd:main Jun 16, 2024
@github-actions github-actions bot mentioned this pull request Jun 13, 2024
@github-actions github-actions bot mentioned this pull request Jul 10, 2024
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.

Casts are not properly called on repository update
3 participants