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

Already on GitHub? Sign in to your account

Bug when creating relationship member inside the init method #1040

Closed
fklingler opened this Issue Jun 17, 2013 · 2 comments

Comments

Projects
None yet
3 participants

I'm still having trouble creating relationships members inside the init method, I think this is linked to issue #449.

App.A = DS.Model.extend({
  bs: DS.hasMany('App.B');

  init: function() {
    this._super();
    App.B.createRecord({a: this});
  }
});

App.A = DS.Model.extend({
  a: DS.belongsTo('App.A');
});

Throws Uncaught TypeError: Cannot read property 'type' of undefined here: https://github.com/emberjs/data/blob/master/packages/ember-data/lib/system/changes/relationship_change.js#L85

@ghost ghost assigned wycats Aug 13, 2013

Owner

wagenet commented Aug 13, 2013

Not sure if this is still an issue.

Owner

wycats commented Sep 28, 2013

I'm going to close this and let someone reopen if it's still an issue on 1.0. Enough of the implementation changed that it's not really directly relevant anymore.

@wycats wycats closed this Sep 28, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment