I think my title is confusing so let me explain.
- My User class has a property called likes that is a one to many relation to a songs table.
- When I update my user object, the songs that are in that relation are duplicated.
- I have other properties that are also one to many relations that are unaffected.
- Same technique is applied in Swift for the iOS counterpart & there are no issues.
- This is what I think is happening:
When you update an object, make sure to include it's objectId property. If the property is not present, Backendless will create a new object.
please help.
Hi!
Try to load related data object and after update user.
Hi!
I don’t understand what you’re saying, do you mean use autoload? It is enabled. Or are you refering to something else?
yes, I meant “autoload”.
Please provide code example for update operation and your application id.
Backendless.UserService.update(loggedInUser, new AsyncCallback<BackendlessUser>() {
@Override
public void handleResponse(BackendlessUser response) {}
@Override
public void handleFault(BackendlessFault fault) {}
});APP ID: CBB6E8A0-4CC0-F84C-FF35-33F5F6297C00Also, what is the latest android sdk version?
I use gradle, could I get the actual build number please?
http://mvnrepository.com/artifact/com.backendless/backendless
compile group: ‘com.backendless’, name: ‘backendless’, version: ‘3.0.15.1’
Thanks, very helpful. Going to make the change now & see if the problem persists. Were you able to get any information from my application ID or do you have any alternative solutions?
Kate, the problem still persists. I’m trying to think about it logically but Its weird because I have many related data objects & this is the only one affected. Even when I don’t modify its data. Any advice? Please.
Hi Kate, problem has been solved. The related class had some old schema fields & was missing the objectID attribute. Thanks again.