{ "id": "126057", "key": "ALOY-952", "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": "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": "2014-08-19T13:19:50.000+0000", "created": "2014-02-07T00:21:45.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "alloy" ], "versions": [ { "id": "15403", "description": "Alloy 1.3.0", "name": "Alloy 1.3.0", "archived": false, "released": true, "releaseDate": "2013-12-20" } ], "issuelinks": [], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2014-08-19T13:19:50.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": "13605", "name": "Models" } ], "description": "I am having a weird issue with alloy model generating an unescaped query, even though it uses prepared statement.\r\nTo recreate it: \r\n\r\n1. Create a model with a non integer primary key. \r\n2. Do a simple model.fetch({id: \"your_text_id\"});\r\n\r\n\r\nIt will generate a query like so: SELECT * FROM table_name WHERE some_primary_key = your_text_id\r\nwhere you would expect something like the following: SELECT * FROM table_name WHERE some_primary_key = 'your_text_id'\r\n\r\nquoted from: http://developer.appcelerator.com/question/162301/weird-sqlite-escaping-issue", "attachment": [ { "id": "50268", "filename": "aloy-952-test.zip", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2014-08-06T08:34:11.000+0000", "size": 5907153, "mimeType": "application/zip" } ], "flagged": false, "summary": "Non numeric primary key not escaped during query", "creator": { "name": "wahyudinata", "key": "wahyudinata", "displayName": "wahyudinata setiawan", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "wahyudinata", "key": "wahyudinata", "displayName": "wahyudinata setiawan", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 180, "state": "closed", "name": "2014 Sprint 17 Alloy", "startDate": "2014-08-18T15:31:24.649Z", "endDate": "2014-09-01T15:31:00.000Z", "completeDate": "2014-09-02T07:53:26.447Z", "originBoardId": 124 } ], "comment": { "comments": [ { "id": "291868", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering based on Tony's comment in the Q&A thread included in this ticket.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-07T06:49:22.000+0000", "updated": "2014-02-07T06:49:22.000+0000" }, { "id": "317242", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "Tested using attached sample app on Alloy 1.3.0 and 1.4.1. \r\nCan't reproduce the issue on v1.4.1.\r\n\r\n{code}\r\n\tconfig: {\r\n\t\tcolumns: {\r\n\t\t \"name\": \"TEXT\",\r\n\t\t \"countryId\": \"TEXT PRIMARY KEY\"\r\n\t\t},\r\n\t\tadapter: {\r\n\t\t\ttype: \"sql\",\r\n\t\t\tcollection_name: \"countries\",\r\n\t\t\tidAttribute: \"countryId\"\r\n\t\t}\r\n\t},\r\n{code}\r\n\r\n{code}\r\nmodel.fetch({id:'SIN'});\r\n{code}", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2014-08-06T08:34:11.000+0000", "updated": "2014-08-06T08:34:11.000+0000" }, { "id": "319270", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Marking as failed because there doesn't seem to be a way to cancel a review.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-08-19T13:18:29.000+0000", "updated": "2014-08-19T13:18:29.000+0000" }, { "id": "319271", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "We are not able to reproduce the issue. Perhaps an intervening change since 1.3.0 has resolved this issue. Please comment here if this remains an issue for you. If you do so, please make sure there's a sample app attached that demonstrates the problem.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-08-19T13:19:50.000+0000", "updated": "2014-08-19T13:19:50.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }