Here's my code.
// The dummy object
ParseObject dummy = new ParseObject("Dummy");
//A profile object
profile = new ParseObject("StudentProfile");
profile.put("name", "sam");
//Putting in pointer
profile.put("dummy",dummy);
//Saving
profile.saveEventually(new SaveCallback() {
@Override
public void done(ParseException e) {
if (e==null){
Toast.makeText(MainActivity.this, "Done", Toast.LENGTH_SHORT).show();
}else{
Log.d("error",""+e.getMessage());
Toast.makeText(MainActivity.this, ""+e.getMessage(), Toast.LENGTH_SHORT).show();
}
}});
A new profile object with a pointer to another object(dummy). While trying to call saveEventually I get this error.
java.lang.IllegalStateException: unable to encode an association with an unsaved ParseObject
Fun thing is , when I try saveInBackground(), it works perfectly.
Help would be highly appreciated.