{ "id": "147975", "key": "AC-1636", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2015-09-30T03:27:00.000+0000", "created": "2015-05-19T19:17:52.000+0000", "labels": [ "android", "backbone", "ios", "titanium" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:38:07.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14544", "name": "Alloy", "description": "Please enter tickets related to the Alloy here." }, { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Hi, i got this error on Titanium SDK 4.0.0RC4 and RC5. \r\nIt happens when you try to get a model on a collection by cid/id, how Backbone deprecated the use of getByCid we have to go this way, but this method is returning null always. \r\n\r\nCollection.get('c1') === null. \r\n\r\nA test case can be:\r\n\r\n{code:javascript}\r\nAlloy.Collections.cars.reset([{'make':'Honda'}, {'make':'Ford'}]);\r\n\r\n// Imagine that we want to get an item by the 'cid' that backbone creates for each item in the collection.\r\n// So if we do that, it returns null. Im using right now getByCid but on Titanium SDK 3.5.1.G.A \r\n// and it works but since Backbone deprecate it.. we have to use the get directly on 4.0.0RC4/5\r\n// If you try to replicate this behaviour with Backbone itself, you´ll see how it works but not on Alloy actually. \r\nAlloy.Collections.cars.get('c1');\r\n{code}\r\n\r\nThanks", "attachment": [], "flagged": false, "summary": "Collection.get returns null when searching by cid", "creator": { "name": "andfk", "key": "andfk", "displayName": "Andrés Franco", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "andfk", "key": "andfk", "displayName": "Andrés Franco", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac OSX 10.10.3. Appcelerator Studio, build: 4.0.0.201505070727. Titanium SDK 4.0.0RC4 and RC5.", "comment": { "comments": [ { "id": "353062", "author": { "name": "hmrida", "key": "hmrida", "displayName": "Harish Mridha", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hi,\r\n\r\nPlease include a test case .That will be really helpful to address your issue.\r\n\r\nThanks\r\n\r\n", "updateAuthor": { "name": "hmrida", "key": "hmrida", "displayName": "Harish Mridha", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2015-05-20T08:30:18.000+0000", "updated": "2015-05-20T08:30:18.000+0000" }, { "id": "353066", "author": { "name": "andfk", "key": "andfk", "displayName": "Andrés Franco", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I attached an example. I hope it helps! ", "updateAuthor": { "name": "andfk", "key": "andfk", "displayName": "Andrés Franco", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-05-20T11:01:39.000+0000", "updated": "2015-05-20T11:01:39.000+0000" }, { "id": "362058", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hi,\r\n\r\nI tested the issue you reported. I can't reproduce it.I tested this using the studio build: 4.1.1.201507141126,Titanium SDK Version:4.1.0.GA,Appcelerator Command-Line Interface, version 4.1.2,alloy 1.7.6 and Node.js Version 0.10.20.I recommend you upgrade SDK to the latest build and let us know if you get the error again. Please include a proper test case and steps to reproduce.\r\n\r\nThanks", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-09-02T11:16:05.000+0000", "updated": "2015-09-30T03:26:51.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }