-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Hi I have been trying to to setup the either adapter but I am running into problem with either of the adapters. I am using a the rc7 of the sails.js 0.10 line and am using the latest SailsAdapter code available on Github. My frontend is a ember-cli project.
Both adapters seem, as far as I have figured out, seem to break on the data format that is not compliant with what ember expects (jsonapi). It breaks with the following error message:
No model was found for '<the first model property>'
If I format the sails API output so that the model data is wrapped in an object that has the model name as a key, all is well. But I would like to try to fix it on the client before I change the server output. Compare:
Current output, with a model named 'sails'
{
name: 'sails'
}Expected
{
sails: {
name: 'sails'
}
}I think I need to transform the data to sideload the associated models as ember expects. Can you give me a little nudge in the right direction here?