Page 1 of 1

querying on a pointer

Posted: Tue Jul 09, 2013 12:18 am
by Jeremy5835883

I have a database with a pointer to a user object. I want to query that table based on the user id. Can you provide a sample of what the query would look like


querying on a pointer

Posted: Tue Jul 09, 2013 12:20 am
by Alena Prykhodko

querying on a pointer

Posted: Tue Jul 09, 2013 12:46 am
by Jeremy5835883

i did...they are not clear to me. can you provide an example? please?


querying on a pointer

Posted: Tue Jul 09, 2013 12:11 pm
by Anton Artyukh5836028

Hi Jeremy,

Example:
We have User with id === "51dba907e4b0cb6cf9c0ba24",
We have collection with column "owner" with type Pointer to Users (pointer<users>)
So if we want retrieve all items with owner "51dba907e4b0cb6cf9c0ba24" we must use this query:
precode{
"owner": {
"$inQuery" : {
"_id": "51dba907e4b0cb6cf9c0ba24"
}
}
}/code/pre
$inQuery is well described here.


querying on a pointer

Posted: Tue Jul 07, 2015 6:18 am
by Dongzhi Yang7528784

Hi Jeremy/Alena,

The links above seem to be re-redirected, could you please share more information or current links.

Thanks

Dongzhi