Backendless Support
 

Declaring a relationship between a data table and geopoint(s)

Data objects in Backendless Service Platform may have related properties not only with other tables, but also with geopoints. These relationships may be declared programmatically or using Backendless Console

This article highlights the process of declaring a Data-to-Geo relationship in a data table schema.

Once a relationship is declared, a developer gains the following opportunities:

  • to link/unlink/manage data objects with related geopoints using console.
  • to use Backendless Code Generator to create client-side code which reflects the structure of the tables.

Declaring a data-to-geo relation has a few differences from declaring a relationship between two data tables. 

A Backendless developer should follow the steps described below to succeed in declaring a data-to-georelations:

  1. Log in to Backendless Console, selecting an app and clicking the Data icon.
  2. Click the table where you would like to declare a relationship with geopoints.
  3. Click the Table Schema and Permissions button.
  4. Click the Add Column button.

The following popup window appears:

   5. Enter the name of the column which will represent the relation.

   6. Select GEOPOINT RELATIONSHIP from the Type drop-down list.

    7. Select One-to-One or One-to-Many from the Cardinality drop-down list. 

By the time all steps are accomplished the popup should look as shown below (except for the name of the column and possibly the cardinality section):

  8. Click Save.

  9. The column appears in the schema as shown below: 

Is article helpful?