SimonChi
Posts: 0
Joined: Mon Nov 10, 2014 1:42 pm

I need help with databse Query se

I have been trying to use the $inQuery clause to enable logged in users to only see items assigned to them.

I have used the following syntax in the where parameter:

{"User": {"$inQuery": {_id: "54aadf25e4b08ad5d6711fac" } } }

After testing the service and it returned the following

[
{
"id":"54aadde2e4b08ad5d6711fa9",
"Meal":"Bread",
"createdAt":"2015-01-05 18:54:26.559",
"updatedAt":"2015-01-06 10:35:46.373",
"User":{
"collName":"users",
"_id":"54aadf25e4b08ad5d6711fac"
}
}
]

which seems to be the correct thing.

Is there any mapping that i need to do for the query service. i.e. before send and for success.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

I need help with databse Query se

Hello,

This doc will help http://devcenter.appery.io/documentat...
Also tutorials have a lot of mapping examples http://devcenter.appery.io/tutorials/

Jon Haider
Posts: 0
Joined: Thu Oct 16, 2014 2:53 pm

I need help with databse Query se

Simon,
I think if you set up your service response to have these parameters, you can map them like you would anything else (using the visual mapping):
Image

Return to “Issues”