… and then that entity would be sideloaded whenever it’s returned in the JSON payload.
Now when you want to have relations loaded lazily (on demand) you need to set async: true in the relation definition. However this seems to break sideloading. Is there some way to achieve both sideloading and asynchronous loading on the same relation?
Ember showed some warnings, when I had some keys in the root-hash of a response that didn’t map to a model, so the adapter didn’t know how to deserialize them.
This seems like the adapter should be able to sideload every known model I include in my responses.
But somehow only the model the request was explicitly sent for gets loaded in the store. The other ones don’t, even if a model-mapping for them exists.
Funny thing is, when I create a new record with an async belongsTo and the server fills the ID of the related record, Ember creates a dummy record for the needed relationship with all values undefined AND loads the data with a GET from the server when the dummy record is accessed.