How I can get owner object when query in database

In title :smiley:
How I can get owner object when query in database

Hello, @Minh_Tuan_Vu.

I didn’t quite understand your question. Could you explain what you mean by “Owner object”?

I advise you to familiarize yourself with our documentation:
https://backendless.com/docs/flutter/data_overview.html

Regards, Nikita.

hi @Nikita_Fedorishchev
I mean, when i get data from backendless db, i will have ownerId but it doesn’t have relate to users table, how i can compress my data and object user by ownerId in result when query data?

Example:
I get data from table A: {“objectId” : “abc”, “ownerId” : “xyz”}
How i can get: {“objectId” : “abc”, “owner” : {“objectId” : “xyz”, “name” : “XYZ” }}

Hi @Minh_Tuan_Vu,

the ownerId column is just a string, this is not an actual relation to the Users table.
So in order to retrieve the user which is owner of the record, you should make another query to DB into the Users table using query like objectId = 'here-goes-the-ownerId'.

Hope this helps.

Cheers,
Stanislaw

1 Like

okay tks

1 Like