backbone-documentmodel icon indicating copy to clipboard operation
backbone-documentmodel copied to clipboard

Instantiation of nested Models fails if nested attributes have their own IDs

Open prg opened this issue 10 years ago • 2 comments

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.

prg avatar Oct 24 '14 09:10 prg

+1

malte-wessel avatar Jan 04 '15 20:01 malte-wessel

+1

Sefarth avatar Mar 31 '15 00:03 Sefarth