backbone-documentmodel
backbone-documentmodel copied to clipboard
Instantiation of nested Models fails if nested attributes have their own IDs
With an object like this:
var obj = {
id: 'a1',
foo: {
id: 'b2',
bar: 'baz'
}
}
instantiation of foo
seems to fail, it's simply omitted and the top-level Model doesn't have the expected attribute (e.g. model.get('foo')
returns undefined
).
As far as I can tell, it's this line's fault.
+1
+1