Skip to content

Nested Stores and Nested Records cause error when committing changes #14

@blt04

Description

@blt04

I have a simple data structure:

Product = SC.Record.extend {
  courses: SC.Record.toMany('Course', {nested: true})
}

I create a nested store:

chainStore = product.get('store').chain();
editProduct = chainStore.find(product);

When I make changes to editProduct and call commitChanges(), SC produces an error:

oldChildren is undefined

in registerChildToParet at store.js:1382

If I access one of the courses in the product record using objectAt before creating the nested store, everything works:

product.get('courses').objectAt(0)
chainStore = product.get('store').chain();
editProduct = chainStore.find(product);

What is the proper procedure for using nested stores on records with nested children?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions