Hello
Let’s say I have the following DB schema (Which I am open to change by the way)
User:
ObjId
userName
Name
likesRel(relationShip to Likes 1:many)
Age
Likes:
ObjId
commentsRel(relatiohsip to Comments 1:1)
date
Comments:
ObjId
title
content
I assume that I don’t need to add PK and FK across the tables because this is what the concept of relationships are.
The above bascially shows you users who made likes on comments.
Now based on the above, I need the following:
Given user Id, get likes and the comments being liked.
Give me all the likes and comments of all the users whose age is less than 25
for a specific comment, get me all the users who liked it
Hi Oleg,
Yes I checked the documentation. So I see you are using the subqueries as opposed to the relationship api. The thing that subqueries returns objectId of the rows of interest not the full data (all the columns of that row). Also in my query 2 above, I am interested in data from 2 tables at once ( which is likes and comments). I think I missunderstanding something. Maybe I need to rereview the docs again