For two models, the application uses DS.RESTAdapter :
App.Calendar = DS.Model.extend({ reservations: DS.hasMany("reservation", { async: true }) }); App.Reservation = DS.Model.extend({ date: DS.attr("date"), calendar: DS.belongsTo("calendar") });
And useful information, for example:
/ Api / calendar / 1:
{ "calendar": { "id": 1, "reservations": [], "links": { "reservations": "/api/calendar/1/reservations" } } }
/ Api / calendar / 1 / reservations:
{ "reservations": [ { "id": 1, "date": "10/01/2014" } ] }
Why is the reservation array in Calendar not loading lazy?
source share