How do you create a relationship between a user and the objects they have added?

I am building a gas tracking application, and I have a vehicle object which contains multiple mpg objects, and I want to make it so that every user can have their own vehicles with their own gas mileage data. What is the best way to approach this being that a user can have multiple vehicles and the vehicles can have multiple mpgs? I have attached my data models as they are currently. Thank you for any help. (776B)

Hi Jacob,

There is an API for creating a relationship between the parent and child objects:



Thank you very much for your response, The one issue that I am having is when trying to use the addRelation functionality I get this error:

Value of type 'IDataStore' has no member 'addRelation'

Please make sure you are using version 4 of the SDK. Do you develop with Android or iOS?

I develop with iOS and hadn’t updated to version 4, thank you!

The easiest way for setting up a project for 4.x is described in the quick start guide:

backendlessuser with addrelation ?? plz


please create separate topic and describe your problem

Hello, my problem is to add relation declared in backendlessuser table :…