viezel/napp.alloy.adapter.restapi — pull request #11 by TNuzzi (2013-08-04 21:17:58+00:00)
Title: Fixed issue where model was being coverted into an array and assigned nu...

...mbers as key rather than the key names.

Was having an issue where I was seeing the models being incorrectly created. I created a fix and did testing locally.

Here is the text output of the raw server response string and the output of the model.toJSON() after the fetch:

[DEBUG] : [REST API] server response
[DEBUG] : {
[DEBUG] : "__v" = 0;
[DEBUG] : "_id" = 51fdb7221cfa8e0000000002;
[DEBUG] : domains = (
[DEBUG] : "ebay.com",
[DEBUG] : "half.com",
[DEBUG] : "paypal.com"
[DEBUG] : );
[DEBUG] : isRegistered = 0;
[DEBUG] : lastLocationsUpdate = "2013-08-04T02:06:26.987Z";
[DEBUG] : lastRoomsUpdate = "2013-08-04T02:06:26.987Z";
[DEBUG] : }
[INFO] : model.toJSON() = {"_id":"51fdb7221cfa8e0000000002","__v":0,"lastLocationsUpdate":"2013-08-04T02:06:26.987Z","lastRoomsUpdate":"2013-08-04T02:06:26.987Z","isRegistered":false,"domains":["ebay.com","half.com","paypal.com"]}