Skip to content

Instantly share code, notes, and snippets.

@pepzwee
Created August 4, 2015 17:36
Show Gist options
  • Save pepzwee/ebfc2df03d24398e2103 to your computer and use it in GitHub Desktop.
Save pepzwee/ebfc2df03d24398e2103 to your computer and use it in GitHub Desktop.
// models/server.js
import DS from 'ember-data';
export default DS.Model.extend({
serverHistory: DS.hasMany("history/server", { async: true })
});
// models/history/server.js
import DS from 'ember-data';
export default DS.Model.extend({
server: DS.belongsTo("server", { async: true })
});
/*
What array does model/server.js hasMany expect?
I've tried:
server_historys_ids
server_histories_ids
history_server_ids
history_servers_ids
I just don't seem to get an XML request for the history... :c
PS! I'm new to Ember so I'm sorry if this is a dumb question.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment