I ensure that the get current user call is done via:
relationList.add(‘usersAutoloadedRelationThatWasIncludedInTheRelationList’);
Backendless.Data.of(BackendlessUser.class).findById(currentUserId, relationsList);
It is important that the relations are loaded.
When updating my object A which has a .setUser(BackendlessUser); method, object A has the property of BackendlessUser, but it is not autoloaded. Then doing:
A.saveAsync(AsyncCallback<AccTime> callback)
Results in a save error: Unable to retrieve value for field-property ‘UsersAutoloadedRelationThatWasIncludedInTheRelationList’
Hello Ersin
Try to map the table to the required class.
Backendless.Persistence.mapTableToClass( “TableName”, TableName.class );
Please notify us here concerning the results.
Regards Anton
I’ve added the line Backendless.Persistence.mapTableToClass( “UsersAutoloadedRelationThatWasIncludedInTheRelationList”, UsersAutoloadedRelationThatWasIncludedInTheRelationList.class);
at the start of my app after Backendless.initApp(…) and the app is functioning as intended with regards to table updates and setUser.
Is there anything I should do to prevent this from happening in the future, or is there any more information that I could learn about that lead to/caused this error.
Thank you.
I believe that’s all, if you have any other questions do not hesitate to ask.