-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Hi huafu,
I'm having and issue after my upgrade to ember 2.1, ember-data 2.1 and ember-data-sails 0.0.16/0.0.17. I'm using the SailsSocketAdapter and the ActiveModelSerializer. The sails backend has not changed (0.11.0). Any help is appreciated.
All standard requests are working as expected. Issues arise when a socket push message comes in. In my case for "comments".
When client A creates a comment, client B gets the websocket frame, but the comment is obviously not parsed as expected. With ember-data-sails@0.0.13 and an old ember-data@1.0.0-beta.15 the record was parsed and created, everything went fine (UI is updated, notification is created). In 0.0.16/0.0.17 with ember-data@2.1.0 not. Using the ember inspector I can see that the new model is not created.
Here the frame that comes from sails:
42["comment",{"verb":"created","data":{"comment":"test","idx_start":null,"idx_end":null,"selected_content":null,"anchor_id":"e8d51873-5732-4d3f-a91b-959dd483ba7c","page_id":22,"created_by":1,"id":80,"createdAt":"2015-10-28T09:33:10.000Z","updatedAt":"2015-10-28T09:33:10.000Z"},"id":80}]
In the receiving client I can see that the above frame is received. I can see that there are no errors on the console. I can see that there are no promises at all (i.e. no failing promises).
I've tried 0.0.13 - 0.0.15, but they won't work due to the ember-data changes from typeKey to modelName. 0.0.16 an 0.0.17 share the described behavior.
Am I missing something or might this be a bug?
Thanks, BR, toovy