{"action":"created","issue":{"url":"https://api.github.com/repos/thiagolocatelli/parse4j/issues/17","labels_url":"https://api.github.com/repos/thiagolocatelli/parse4j/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/thiagolocatelli/parse4j/issues/17/comments","events_url":"https://api.github.com/repos/thiagolocatelli/parse4j/issues/17/events","html_url":"https://github.com/thiagolocatelli/parse4j/issues/17","id":41952424,"number":17,"title":"ParseFile must be saved before being set on a ParseObject","user":{"login":"lucrus73","id":8657470,"avatar_url":"https://avatars.githubusercontent.com/u/8657470?v=3","gravatar_id":"","url":"https://api.github.com/users/lucrus73","html_url":"https://github.com/lucrus73","followers_url":"https://api.github.com/users/lucrus73/followers","following_url":"https://api.github.com/users/lucrus73/following{/other_user}","gists_url":"https://api.github.com/users/lucrus73/gists{/gist_id}","starred_url":"https://api.github.com/users/lucrus73/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucrus73/subscriptions","organizations_url":"https://api.github.com/users/lucrus73/orgs","repos_url":"https://api.github.com/users/lucrus73/repos","events_url":"https://api.github.com/users/lucrus73/events{/privacy}","received_events_url":"https://api.github.com/users/lucrus73/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2014-09-04T15:48:34Z","updated_at":"2015-03-02T20:16:57Z","closed_at":null,"body":"I use the following code with parse4j 1.3 in a wicket web application:\r\n\r\n<pre>\r\n        ParseQuery<Event> pq = ParseQuery.getQuery(Event.class);\r\n        pq.skip((int)first);\r\n        pq.limit((int)count);\r\n        return pq.find().iterator();\r\n</pre>\r\n\r\nThe find() call raises an IllegalArgumentException: ParseFile must be saved before being set on a ParseObject. However I'm not saving any object, I'm only fetching. Here is my Event class:\r\n\r\n<pre>\r\n@ParseClassName(\"Event\")\r\npublic class Event extends ParseObject\r\n{\r\n\r\n  public String getEventLinkRegistration()\r\n  {\r\n    return getString(\"eventLinkRegistration\");\r\n  }\r\n\r\n  public void setEventLinkRegistration(String eventLinkRegistration)\r\n  {\r\n    put(\"eventLinkRegistration\", eventLinkRegistration);\r\n  }\r\n\r\n  public String getEventContactName()\r\n  {\r\n    return getString(\"eventContactName\");\r\n  }\r\n\r\n  public void setEventContactName(String eventContactName)\r\n  {\r\n    put(\"eventContactName\", eventContactName);\r\n  }\r\n\r\n  public String getEventContactMail()\r\n  {\r\n    return getString(\"eventContactMail\");\r\n  }\r\n\r\n  public void setEventContactMail(String eventContactMail)\r\n  {\r\n    put(\"eventContactMail\", eventContactMail);\r\n  }\r\n\r\n  public String getEventContactPhone()\r\n  {\r\n    return getString(\"eventContactPhone\");\r\n  }\r\n\r\n  public void setEventContactPhone(String eventContactPhone)\r\n  {\r\n    put(\"eventContactPhone\", eventContactPhone);\r\n  }\r\n\r\n  public String getEventAddress()\r\n  {\r\n    return getString(\"eventAddress\");\r\n  }\r\n\r\n  public void setEventAddress(String eventAddress)\r\n  {\r\n    put (\"eventAddress\", eventAddress);\r\n  }\r\n\r\n  public String getEventCity()\r\n  {\r\n    return getString(\"eventCity\");\r\n  }\r\n\r\n  public void setEventCity(String eventCity)\r\n  {\r\n    put(\"eventCity\", eventCity);\r\n  }\r\n\r\n  public ParseRelation<Country> getEventCountry()\r\n  {\r\n    return getRelation(\"eventCountry\");\r\n  }\r\n\r\n  public void setEventCountry(ParseRelation<Country> eventCountry)\r\n  {\r\n    put(\"eventCountry\", eventCountry);\r\n  }\r\n\r\n  public String getEventTitle()\r\n  {\r\n    return getString(\"eventTitle\");\r\n  }\r\n\r\n  public void setEventTitle(String eventTitle)\r\n  {\r\n    put(\"eventTitle\", eventTitle);\r\n  }\r\n\r\n  public String getEventText()\r\n  {\r\n    return getString(\"eventText\");\r\n  }\r\n\r\n  public void setEventText(String eventText)\r\n  {\r\n    put(\"eventText\", eventText);\r\n  }\r\n\r\n  public Date getEventDate()\r\n  {\r\n    return getDate(\"eventDate\");\r\n  }\r\n\r\n  public void setEventDate(Date eventDate)\r\n  {\r\n    put(\"eventDate\", eventDate);\r\n  }\r\n\r\n  public ParseFile getEventImg()\r\n  {\r\n    return getParseFile(\"eventImg\");\r\n  }\r\n\r\n  public void setEventImg(ParseFile eventImg)\r\n  {\r\n    put(\"eventImg\", eventImg);\r\n  }\r\n\r\n  public ParseGeoPoint getEventPosition()\r\n  {\r\n    return getParseGeoPoint(\"eventPosition\");\r\n  }\r\n\r\n  public void setEventPosition(ParseGeoPoint eventPosition)\r\n  {\r\n    put(\"eventPosition\", eventPosition);\r\n  }\r\n\r\n}\r\n</pre>\r\n\r\nHere is the relevant part of the stack trace:\r\n\r\nCaused by: java.lang.IllegalArgumentException: ParseFile must be saved before being set on a ParseObject.\r\n\tat org.parse4j.ParseObject.put(ParseObject.java:359)\r\n\tat org.parse4j.ParseObject.setData(ParseObject.java:725)\r\n\tat org.parse4j.ParseQuery.find(ParseQuery.java:499)\r\n"},"comment":{"url":"https://api.github.com/repos/thiagolocatelli/parse4j/issues/comments/76806829","html_url":"https://github.com/thiagolocatelli/parse4j/issues/17#issuecomment-76806829","issue_url":"https://api.github.com/repos/thiagolocatelli/parse4j/issues/17","id":76806829,"user":{"login":"Gsx1992","id":5297822,"avatar_url":"https://avatars.githubusercontent.com/u/5297822?v=3","gravatar_id":"","url":"https://api.github.com/users/Gsx1992","html_url":"https://github.com/Gsx1992","followers_url":"https://api.github.com/users/Gsx1992/followers","following_url":"https://api.github.com/users/Gsx1992/following{/other_user}","gists_url":"https://api.github.com/users/Gsx1992/gists{/gist_id}","starred_url":"https://api.github.com/users/Gsx1992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gsx1992/subscriptions","organizations_url":"https://api.github.com/users/Gsx1992/orgs","repos_url":"https://api.github.com/users/Gsx1992/repos","events_url":"https://api.github.com/users/Gsx1992/events{/privacy}","received_events_url":"https://api.github.com/users/Gsx1992/received_events","type":"User","site_admin":false},"created_at":"2015-03-02T20:16:57Z","updated_at":"2015-03-02T20:16:57Z","body":"I see the readme has been updated saying that v1.4 is available but it doesn't appear to be working in maven."}}