@johnnyicon wrote:
Does anyone have any practical examples of how to call the
#findBelongsTo
method on the JSONAPIAdapter?To give some context, I have a
house
model which has one (1)master-bedroom
.In my
master-bedroom
model, I have defined the relationship to the itshouse
as such:export default DS.Model.extend({ ... house: DS.belongsTo('house') ... });
I’m trying to access the
master-bedroom
of ahouse
from ahouse
route (e.g.,http://localhost:4200/house/1
).I would like to use the
#findBelongsTo
method to do so because the URL this method generates makes the most sense to me (e.g.,http://localhost:4200/house/1/master-bedroom
).
Posts: 1
Participants: 1