Edit: I rewrote this issue as I think I found the root cause of my problem.
The side loading example in the README (the author profile one) does not seem to work as intended.
See http://jsfiddle.net/DkzdF/ for an example.
When running it crashes with "Uncaught Error: assertion failed: Your server returned a hash with the key profiles but you have no mappings".
That's strange, isn't this how side-loading is supposed to work? Changing the name of the json key from 'profiles' to 'profile solves the problem but that doesn't make any sense.
I think I've narrowed it down to this piece of code: https://github.com/emberjs/data/blob/master/packages/ember-data/lib/adapters/rest_adapter.js#L310
It appears that the rest adapter thinks the json key 'profiles' refers to a non-existing DS.hasMany('App.Profile') relation in App.Author when it actually refers to the DS.belongsTo('profile') relation.
Shouldn't the sideLoad() method be iterating the model's relations and crosschecking the json for a compatible key instead of vice-verse?
In any case, the example of side-loading in the README does not seem to work anymore, is this indended? If so how is side-loading supposed to work?
Shouldn't the keys "posts" and "tags" be wrapped within the root key "user"?
The JSON is fine. You have to tell the adapter how your root JSON keys map to your models:
It knows that "authors" maps to App.Author, because that's the model you passed into findAll, but it makes no assumptions about the other JSON keys.
That said, if you add the mapping to your fiddle, you'll run into another error because you're bypassing the store and triggering the adapter's didFindAll function by hand. Here's a fork of your fiddle that shows it working via store.findAll instead: http://jsfiddle.net/wspA5/1/
Awesome, thanks a lot, exactly what I was looking for. I just wished it had been documented somewhere :/
I think this issue is not relevant anymore as we should now use RESTAdapter.configure to set mapping