{"action":"created","issue":{"url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/196","labels_url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/196/labels{/name}","comments_url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/196/comments","events_url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/196/events","html_url":"https://github.com/Raizlabs/DBFlow/issues/196","id":68156597,"number":196,"title":"save() cant cast string to long","user":{"login":"OptimistNot","id":9680309,"avatar_url":"https://avatars.githubusercontent.com/u/9680309?v=3","gravatar_id":"","url":"https://api.github.com/users/OptimistNot","html_url":"https://github.com/OptimistNot","followers_url":"https://api.github.com/users/OptimistNot/followers","following_url":"https://api.github.com/users/OptimistNot/following{/other_user}","gists_url":"https://api.github.com/users/OptimistNot/gists{/gist_id}","starred_url":"https://api.github.com/users/OptimistNot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OptimistNot/subscriptions","organizations_url":"https://api.github.com/users/OptimistNot/orgs","repos_url":"https://api.github.com/users/OptimistNot/repos","events_url":"https://api.github.com/users/OptimistNot/events{/privacy}","received_events_url":"https://api.github.com/users/OptimistNot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-13T17:54:32Z","updated_at":"2015-04-16T15:06:06Z","closed_at":null,"body":"Hey!\r\nim trying to save data in JSONModel. Ex:\r\n            JSONObject object = new JSONObject(json);\r\n            json_model.setData(object);\r\n            save(false);\r\nand im getting exception\r\n Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long\r\n\r\non saving my id field! in json i have it like  {\"final_product_audit_id\":200}\r\n\r\ni tried:   Timber.e(\"id: \" + object.getLong(\"final_product_audit_id\")); and its passed!\r\nbut this one:\r\n            Timber.e(\"id: \" + (long)object.get(\"final_product_audit_id\"));  failed.\r\n\r\non line:\r\n((long)modelContainer.getValue(\"final_product_audit_id\")) > 0 i got the exception\r\n\r\nThank you!"},"comment":{"url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/comments/93758107","html_url":"https://github.com/Raizlabs/DBFlow/issues/196#issuecomment-93758107","issue_url":"https://api.github.com/repos/Raizlabs/DBFlow/issues/196","id":93758107,"user":{"login":"OptimistNot","id":9680309,"avatar_url":"https://avatars.githubusercontent.com/u/9680309?v=3","gravatar_id":"","url":"https://api.github.com/users/OptimistNot","html_url":"https://github.com/OptimistNot","followers_url":"https://api.github.com/users/OptimistNot/followers","following_url":"https://api.github.com/users/OptimistNot/following{/other_user}","gists_url":"https://api.github.com/users/OptimistNot/gists{/gist_id}","starred_url":"https://api.github.com/users/OptimistNot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OptimistNot/subscriptions","organizations_url":"https://api.github.com/users/OptimistNot/orgs","repos_url":"https://api.github.com/users/OptimistNot/repos","events_url":"https://api.github.com/users/OptimistNot/events{/privacy}","received_events_url":"https://api.github.com/users/OptimistNot/received_events","type":"User","site_admin":false},"created_at":"2015-04-16T15:06:06Z","updated_at":"2015-04-16T15:06:06Z","body":"ok i Overrided getInstance also...now i only work with JsonModel class and getValue() is called properly.\r\nThanks anyway :)"}}