Users to Data Service Relation

Hi,everyone! i’m stuck in another problem , Plz help me .

i’m trying to store data object through data service api and then adding relation with Users (parent).
but i’m facing an error again and again.

i have created relation from backendless console.

here is sample code which i’m trying.

Backendless.Persistence.of(“services”).save(obj, new AsyncCallback<Map>() {
@Override
public void handleResponse(Map response) {

    child.add(response);    // Array list 
    Log.d("object id ",response.get("objectId"));   // object id is retrived successfully
    Backendless.Data.of(BackendlessUser.class).addRelation(Backendless.UserService.CurrentUser(), "workshopservices:services:n", child, new AsyncCallback&lt;Integer&gt;() {
        @Override
        public void handleResponse(Integer integer) {

            Toast.makeText(getActivity(), "done", Toast.LENGTH_SHORT).show();
        }

        @Override
        public void handleFault(BackendlessFault backendlessFault) {

          Log.e("RelationError",""+backendlessFault.getMessage());            }
    });

}

@Override
public void handleFault(BackendlessFault fault) {
    Log.e( "DataStoreError", "" + fault.getMessage())
}

});

And this is ERROR:
Unable to create relation .Child object with ids ‘null’, ’ null’ are not found in the related table

Hello,

Could you please let me know what version of the SDK for Android you use?

Regards,
Mark

yeah offcourse,
compile ‘com.backendless:backendless:4.0.0-beta4’

Hi naseebali

I’ve reproduced the issue you’ve described and opened an internal ticket which you can reference by id BKNDLSS-14814. We’ll notify you as soon as it’s fixed. Sorry for the inconvenience

Regards Anton

Hello,

The problem has been fixed. You can get the latest library build from our github repository:
https://github.com/Backendless/Android-SDK/tree/4_0/out

The maven repo will be updated soon.

Regards,
Mark

Thanks Mark Piller .

Also Thanks Anton Govorushkin.
Error is fixed