You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The merge utility doesn't appear to work on deeply nested paths. For example, if I have a schema:
name:
first: String
last: String
then the first and last properties aren't merged into the parent object. It looks like this is because the value is retrieved on the source document by array getter (e.g. doc[name]), and when name is "name.first" the retrieval fails.
(I think this is relatively straightforward to fix, but I also believe you need to code for edge cases around circular references, which if is the case complicates things some. it's possible the code from node.extend could be leveraged?...)
The text was updated successfully, but these errors were encountered:
I'll look into this. Merge has a few edge cases that will probably never work, like arrays and embedded docs. This can work though, it's going to be similar to a deep extend or clone
First, thanks for the really useful library.
The merge utility doesn't appear to work on deeply nested paths. For example, if I have a schema:
then the first and last properties aren't merged into the parent object. It looks like this is because the value is retrieved on the source document by array getter (e.g. doc[name]), and when name is "name.first" the retrieval fails.
(I think this is relatively straightforward to fix, but I also believe you need to code for edge cases around circular references, which if is the case complicates things some. it's possible the code from node.extend could be leveraged?...)
The text was updated successfully, but these errors were encountered: