Relations Problem

Hi i am creating relation i saw one your video on youtube which demonstrate how to create relation and i implement that same thing but it is not working
One more question do i need to login in order to set relation to the specific user ?

BackendlessUser user = new BackendlessUser();

        UserInformation userInformation = new UserInformation() ;

        userInformation.setName(sharedPreferences.getString("userName" , ""));
        userInformation.setPassportNo(sharedPreferences.getString("passportNo" , ""));
        userInformation.setDateOfBirth(sharedPreferences.getString("dateOfBirth" , ""));
        user.setProperty("userInformation" , userInformation);

here userInformation is Object

Relations in Backendless cannot be established as you show in the code. See the API documentation at:
https://backendless.com/docs/android/data_relations_set_add_overview_android.html