Closed Graphmaxer closed 3 months ago
This looks like the issue is coming from this change https://github.com/Codedredd/pinia-orm/commit/4ecf93f43b2dcfb98864f7c791a3d70c8be58a99#diff-400250a2f26ef8d1fdaaa2a3757bfdf1dd8fda2c402d89c0670a7d7c110b260bL840, the new data record
is not hydrated when updating an existing entry
@Graphmaxer This was somehow also more a feature than a bug. I didn't exspect custom classes as values with their own serialzer.
Thanks you a lot :+1: We got this use case in our migration from vue/vuex-orm to pinia/pinia-orm. Maybe we should document this feature in the documentation ? :thinking:
Environment
No response
Reproduction
On https://github.com/Graphmaxer/pinia-orm/tree/fix/cast-on-update with test feature/casts/custom_casts
Describe the bug
When updating an existing model inside a repo via
save
the cast is not properly calledAdditional context
No response
Logs
No response