JS-Data error: attrs must contain the property specified by idAttribute - with hasMany relations
问题 Here's the error: http://puu.sh/lXzja/f773fb6c9a.png The primary key for my user model is username. The primary key for my routes is the routename. My api returns jsons inside data:{} as per jsonapi.org specs. Thus the id attribute is not in the top-level, as js-data demands. This is why I return data.data in the afterFind for 'users'. I tried to do something like that in 'routes' but it's an array of routes. The console log in beforeInject gives me: result in beforeInject Here's the config: