Fixed snapshot behavior with nested keys#27
Fixed snapshot behavior with nested keys#27SergeAstapov wants to merge 1 commit intoadopted-ember-addons:masterfrom
Conversation
|
@SergeAstapov Quick comment - one of the main motivations in the original rewrite was to store the keys in a nested format internally so as to easily iterate over the object. (I can/should explain more though) |
|
I see, thanks explanation @snewcomer! I'll try to work on this PR and rewrite implementation so that snapshot produces nested format and restore uses it. |
|
I found this PR and issue #25 while trying to migrate my codebase from I get the This happens because if first check Should I consider that |
|
@bartocc Here is a chain of PRs I implemented to solve the case where someone calls |
@snewcomer I would need some help/advice how to update
restore()method.In v2 branch of ember-changeset,
_changesobject was stored as a map/hash with keys in formatfooorfoo.bar.baz.validated-changeset stores
_changesin format likeBecause of that changes I'm not sure what would you consider the most efficient way of restoring Changeset from snapshot.
The new test
#restore restores a snapshot of the changeset with nested valueshas been created and it currently fails as no changes torestore()have been made.