Support Topics Documentation Slack YouTube Blog

Relation one to one how to retrieve

i have a relation to data table table from geo point
1
my question is can i retrieve the geopoint with a query from the data table?
2

Hi Mohammad,

you shoul make call to geo category in order to retrieve geopoint related to some records from your data table. Suppose you called your geo category stores, and your data object is in store_location field of metadata. Then your code would look like this:

where Method Argument "objectId" is an objectId of your data object.

Regards,
Stanislaw

@stanislaw.grin Thank you
does the logic is the same for relations between data tables also?
if so. should i create a relation in the two data tables?

What logic are you talking about? Please describe the scenario you have in mind.

Hey @mark-piller
i have table A and table B
table A have a relation 1:1 to table B

can i query table B and retrieve the related table A data?

Yes, you can. Suppose the name of the column in A is “relatedDataFromB”, then when you query table B, you can add the following to the list of requested properties:

A[relatedDataFromB].propertyName

This will return the property named propertyName from the related A table.

1 Like