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

Bug when creating relationship member inside the init method #1040

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

Bug when creating relationship member inside the init method #1040

fklingler opened this issue Jun 17, 2013 · 2 comments
Assignees
Labels
🏷️ bug This PR primarily fixes a reported issue Needs Bug Verification

Comments

@fklingler
Copy link

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
@wagenet
Copy link
Member

wagenet commented Aug 13, 2013

Not sure if this is still an issue.

@wycats
Copy link
Member

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 as completed Sep 28, 2013
@runspired runspired added 🏷️ bug This PR primarily fixes a reported issue and removed Bug labels Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bug This PR primarily fixes a reported issue Needs Bug Verification
Projects
None yet
Development

No branches or pull requests

4 participants