Support Topics Documentation Slack YouTube Blog

Retrieve the oldest object in a 1 to many relation using the parent objectId (Rest DataAPI)

Hi,

I have two objects Layer and Option. Layer (via a property called options) refers to many Option(s). I wish to (given a Layer objectId) to return the related Option with the lowest created property. It was mentioned:

you need to send a request to the child table with a whereclause referencing the parent. Order by created with pageSize set to 1

However i’m still unsure on how to proceed in this manner.

Many thanks,
Grant.

Backendless Version (6.2.2)

Client SDK (REST)

Hello @Grant_Kerr

I assume you are looking for Inverted Relation Retrieval

Layer[options].objectId = 'LayerObjectId'

Regads, Vlad

Superb! Many thanks Vlad :smiley: