@wowember wrote:
How do you interact with a model’s belongsTo relationships?
If I have a model:
model-with-references.js
export default DS.Model.extend({ referenced_thing: DS.belongsTo('thing'), referenced_thing_async: DS.belongsTo('thing_async', {async: true}) });
Then in a route or a controller, how do I do:
let referenced_thing = this.get('modelWithReferences') .howToGetTheReferencedThing() let referenced_thingAsync = this.get('modelWithReferences') .howToGetTheReferencedThingAsync()
Posts: 2
Participants: 2