{ "id": "163748", "key": "ALOY-1525", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2016-11-04T17:54:49.000+0000", "created": "2016-10-05T14:33:04.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "alloy", "bindings", "samples" ], "versions": [], "issuelinks": [], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2016-11-08T10:58:53.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "13605", "name": "Models" } ], "description": "The sample app\r\n* https://github.com/appcelerator/alloy/tree/master/test/apps/models/binding_no_persistence\r\nfails with the error\r\n* TypeError: Cannot read property '__transform' of undefined (Android) and \r\n* TypeError: undefined is not an object (evaluating '$model.__transform') (iOS) respectively.\r\n\r\nDoes this mean that it is no more possible to use Alloy Binding without persistence?", "attachment": [ { "id": "60433", "filename": "binding_no_persistence.zip", "author": { "name": "twiesen", "key": "twiesen", "displayName": "Thomas Wiesen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-05T16:01:49.000+0000", "size": 7006, "mimeType": "application/zip" } ], "flagged": false, "summary": "Alloy Binding without persistence doesn't seem to work anymore", "creator": { "name": "twiesen", "key": "twiesen", "displayName": "Thomas Wiesen", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "twiesen", "key": "twiesen", "displayName": "Thomas Wiesen", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Host OS: Mac OS X\r\nOS Version: 10.11.6\r\nOS Arch: x86_64\r\n\r\nAppcelerator Studio Version: 4.7.1.201609100950\r\n\r\nSelected Titanium SDK: 5.5.1.GA\r\n", "comment": { "comments": [ { "id": "398128", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I can't access the sample app page. Can you attach the file in here for us to test? Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-10-05T15:29:30.000+0000", "updated": "2016-10-05T15:29:30.000+0000" }, { "id": "398134", "author": { "name": "twiesen", "key": "twiesen", "displayName": "Thomas Wiesen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I think I didn't add the link properly, sorry.\r\n\r\nTry this:\r\n\r\n[https://github.com/appcelerator/alloy/tree/master/samples/apps/models/binding_no_persistence]\r\n\r\nI also added the sample in question as a zip file.", "updateAuthor": { "name": "twiesen", "key": "twiesen", "displayName": "Thomas Wiesen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-05T16:04:11.000+0000", "updated": "2016-10-05T16:04:11.000+0000" }, { "id": "400424", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "[~twiesen], binding without persistence still works. You just need to create the model files under {{app/models}} with no adapter type.\r\n\r\nE.g.\r\n{code}\r\n// app/models/appState.js\r\nexports.definition = {\r\n\tconfig: {\r\n\t\t\"defaults\": {\r\n\t\t\tcounter: 1,\r\n\t\t\tcolor: '#00f'\r\n\t\t}\r\n\t},\r\n\textendCollection : function(Collection) {\r\n\t\t_.extend(Collection.prototype, {\r\n\r\n\t\t\t// For Backbone v1.1.2, uncomment this to override the fetch method\r\n\t\t\t/*\r\n\t\t\tfetch: function(options) {\r\n\t\t\t\toptions = options ? _.clone(options) : {};\r\n\t\t\t\toptions.reset = true;\r\n\t\t\t\treturn Backbone.Collection.prototype.fetch.call(this, options);\r\n\t\t\t},\r\n\t\t\t*/\r\n\t\t});\r\n\t\treturn Collection;\r\n\t}\r\n}\r\n{code}", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2016-11-04T17:54:23.000+0000", "updated": "2016-11-04T17:54:23.000+0000" }, { "id": "400575", "author": { "name": "twiesen", "key": "twiesen", "displayName": "Thomas Wiesen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thank you so much! I wasn't aware of this change and I couldn't find it documented anywhere.", "updateAuthor": { "name": "twiesen", "key": "twiesen", "displayName": "Thomas Wiesen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-11-08T10:58:53.000+0000", "updated": "2016-11-08T10:58:53.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }