Created
September 22, 2014 13:21
-
-
Save sly7-7/a75f2bfd72c801d5414f to your computer and use it in GitHub Desktop.
relationships weirdness
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.Event = DS.Model.extend({ | |
user: DS.belongsTo('user'), | |
project: DS.belongsTo('project', {inverse: null}) | |
}); | |
App.Project = DS.Model.extend({ | |
users: DS.hasMany('user', { async: true, inverse: null}), | |
administrators: DS.hasMany('user', { async: true, inverse: null}), | |
}); | |
App.User = DS.Model.extend({ | |
// crash if not defined | |
//events: DS.hasMany('event', {async: true}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment