Hey, I have table Relationship. It has columns Person ( 1-1 to Person Table) and Friends(1-N to Person table). I got in Android list of all friends i.e.
List<Person> friends
I added one more person to that list:
friends.add(newPerson);
and updated Relationship class:
relationship.setFriends(friends);
and now I want to update it on sarver:
relationship.saveAsync(new AsyncCallback<Relationship>() {
public void handleResponse(Relationship savedContact) {
Log.v("It works", "It works");
}
@Override
public void handleFault(BackendlessFault backendlessFault) {
Log.v("Nooo,it doesn't work", backendlessFault.toString());
}
});
}
I got this exception: BackendlessFault{ code: ‘36’, message: ‘Duplicate entry for column ‘user’’ }