[ALOY-952] Non numeric primary key not escaped during query
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2014-08-19T13:19:50.000+0000 |
Affected Version/s | Alloy 1.3.0 |
Fix Version/s | n/a |
Components | Models |
Labels | alloy |
Reporter | wahyudinata setiawan |
Assignee | Feon Sua Xin Miao |
Created | 2014-02-07T00:21:45.000+0000 |
Updated | 2014-08-19T13:19:50.000+0000 |
Description
I am having a weird issue with alloy model generating an unescaped query, even though it uses prepared statement. To recreate it: 1. Create a model with a non integer primary key. 2. Do a simple model.fetch({id: "your_text_id"}); It will generate a query like so: SELECT * FROM table_name WHERE some_primary_key = your_text_id where you would expect something like the following: SELECT * FROM table_name WHERE some_primary_key = 'your_text_id' quoted from: http://developer.appcelerator.com/question/162301/weird-sqlite-escaping-issueAttachments
File | Date | Size |
---|---|---|
aloy-952-test.zip | 2014-08-06T08:34:11.000+0000 | 5907153 |