Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements support for handling inverse relationships with toMany attrib... #875

Closed
wants to merge 4 commits into from

Commits on Jan 4, 2013

  1. Implements support for handling inverse relationships with toMany att…

    …ribute
    
    This is already handle if we get the toMany attribute of a record and
    use pushObject. Like this: bar1.get('fooToMany').pushObject(foo2);
    
    We this commit, the inverse relationships is also notify if we directly
    set the attribute with an array. Like this:
    bar1.set('fooToMany', [foo2, foo3]);
    nicolasbadia committed Jan 4, 2013
    Configuration menu
    Copy the full SHA
    ac2e362 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2013

  1. Fix the return value

    nicolasbadia committed Jan 9, 2013
    Configuration menu
    Copy the full SHA
    dd7a17f View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2013

  1. Add the ability to pass an SC.ManyArray or a null value

    isSCArray is now used to check if the newRecords variable is an array.
    This avoid an exception if we pass an SC.ManyArray because SC.typeOf
    return 'object'.
    If we pass null, transform it to an empty array. This will remove the
    inverses relationship.
    nicolasbadia committed Feb 22, 2013
    Configuration menu
    Copy the full SHA
    7d5e57c View commit details
    Browse the repository at this point in the history
  2. Small refactorisation

    nicolasbadia committed Feb 22, 2013
    Configuration menu
    Copy the full SHA
    6d2f66d View commit details
    Browse the repository at this point in the history