I am trying to create a relation between 2 columns but getting the error I have already defined in the Backendless about the relation column
here is my code
StudentPersonalTeachers studentPersonalTeachers = new
StudentPersonalTeachers();
studentPersonalTeachers.setTeacherName(TT_Name);
studentPersonalTeachers.setTeacherImageUrl(TT_ImageURL);
studentPersonalTeachers.setTeacherOwnerId(TT_OwnerId);
final ArrayList<StudentPersonalTeachers> userInfoCollection = new ArrayList<StudentPersonalTeachers>();
userInfoCollection.add( studentPersonalTeachers );
Backendless.Persistence.save(studentPersonalTeachers, new AsyncCallback<StudentPersonalTeachers>() {
@Override
public void handleResponse(StudentPersonalTeachers response) {
StudentInformation studentInformation = new StudentInformation() ;
Backendless.Data.of( StudentInformation.class ).setRelation(studentInformation, "studentPersonalTeacher", userInfoCollection,
new AsyncCallback<Integer>() {
@Override
public void handleResponse(Integer response) {
Toast.makeText(AddTeacher.this, "Relation Created", Toast.LENGTH_SHORT).show();
// now update the specific entry OKAY based on Information
}
@Override
public void handleFault(BackendlessFault fault) {
Toast.makeText(AddTeacher.this, fault.getMessage(), Toast.LENGTH_SHORT).show();
}
});
@Override
public void handleFault(BackendlessFault fault) {
cardViewButton.setVisibility(View.VISIBLE);
progressBar.setVisibility(View.INVISIBLE);
cardViewOfTeacherNameHeading.setEnabled(true);
fourthEditText.setEnabled(true);
Toast.makeText(AddTeacher.this, tryAgain, Toast.LENGTH_SHORT).show();
}
});