{"action":"closed","issue":{"url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/182","labels_url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/182/labels{/name}","comments_url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/182/comments","events_url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/182/events","html_url":"https://github.com/Raizlabs/DBFlow/issues/182","id":66816044,"number":182,"title":"Order field syntax error","user":{"login":"renouille","id":3862301,"avatar_url":"https://avatars.githubusercontent.com/u/3862301?v=3","gravatar_id":"","url":"https://api.github.com/users/renouille","html_url":"https://github.com/renouille","followers_url":"https://api.github.com/users/renouille/followers","following_url":"https://api.github.com/users/renouille/following{/other_user}","gists_url":"https://api.github.com/users/renouille/gists{/gist_id}","starred_url":"https://api.github.com/users/renouille/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renouille/subscriptions","organizations_url":"https://api.github.com/users/renouille/orgs","repos_url":"https://api.github.com/users/renouille/repos","events_url":"https://api.github.com/users/renouille/events{/privacy}","received_events_url":"https://api.github.com/users/renouille/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Raizlabs/DBFlow/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Raizlabs/DBFlow/milestones/6","html_url":"https://github.com/Raizlabs/DBFlow/milestones/2.0.0","labels_url":"https://api.github.com/repos/Raizlabs/DBFlow/milestones/6/labels","id":987037,"number":6,"title":"2.0.0","description":null,"creator":{"login":"agrosner","id":2117859,"avatar_url":"https://avatars.githubusercontent.com/u/2117859?v=3","gravatar_id":"","url":"https://api.github.com/users/agrosner","html_url":"https://github.com/agrosner","followers_url":"https://api.github.com/users/agrosner/followers","following_url":"https://api.github.com/users/agrosner/following{/other_user}","gists_url":"https://api.github.com/users/agrosner/gists{/gist_id}","starred_url":"https://api.github.com/users/agrosner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agrosner/subscriptions","organizations_url":"https://api.github.com/users/agrosner/orgs","repos_url":"https://api.github.com/users/agrosner/repos","events_url":"https://api.github.com/users/agrosner/events{/privacy}","received_events_url":"https://api.github.com/users/agrosner/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":14,"state":"open","created_at":"2015-02-19T16:57:43Z","updated_at":"2015-05-06T15:49:57Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-04-07T08:06:06Z","updated_at":"2015-05-06T15:49:57Z","closed_at":"2015-05-06T15:49:57Z","body":"I have a table with a field called \"order\". When saving the object, it throws a syntax error :\r\n\r\n    Category cat = new Category();\r\n    cat.id = catJSON.getString(Category$Table.ID);\r\n    cat.order = catJSON.getString(Category$Table.ORDER);\r\n    cat.save(false);\r\n\r\n    E/SQLiteLog﹕ (1) near \"order\": syntax error\r\n    E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #1\r\n    Process: dbflowtest, PID: 9839\r\n    java.lang.RuntimeException: An error occured while executing doInBackground()\r\n            at android.os.AsyncTask$3.done(AsyncTask.java:300)\r\n            at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)\r\n            at java.util.concurrent.FutureTask.setException(FutureTask.java:222)\r\n            at java.util.concurrent.FutureTask.run(FutureTask.java:242)\r\n            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)\r\n            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)\r\n            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)\r\n            at java.lang.Thread.run(Thread.java:818)\r\n    Caused by: android.database.sqlite.SQLiteException: near \"order\": syntax error (code 1): , while compiling: UPDATE  OR ABORT Category SET order=?,id=? WHERE `id`='3379629'\r\n            at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)\r\n            at  android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)\r\n            at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)\r\n            at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)\r\n            at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)\r\n            at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)\r\n            at android.database.sqlite.SQLiteDatabase.updateWithOnConflict(SQLiteDatabase.java:1574)\r\n            at com.raizlabs.android.dbflow.SQLiteCompatibilityUtils.updateWithOnConflict(SQLiteCompatibilityUtils.java:63)\r\n"}}