Page 1 of 1

Limit Fields to Return from a Query - MongoDB

Posted: Sat Jul 26, 2014 2:36 pm
by bahar.wadia

Ok guys.....

When do you think you will enable the "Limit Fields" feature of MongoDB. I am assuming you are still using MongoDB for your backend. The performance advantages are monumental in a pictures driven app.

http://docs.mongodb.org/manual/tutori...


Limit Fields to Return from a Query - MongoDB

Posted: Sat Jul 26, 2014 5:51 pm
by obullei

Hello!

Thank you for your suggestion.
It will be transferred to our developer team.


Limit Fields to Return from a Query - MongoDB

Posted: Mon Jul 28, 2014 12:41 pm
by Maryna Brodina

Hello!

It is implemented already, please take a look here http://devcenter.appery.io/documentat...


Limit Fields to Return from a Query - MongoDB

Posted: Tue Jul 29, 2014 6:59 am
by bahar.wadia

Hi Maryna,

Thanks for the response. Projection is working as expected. Significantly improved my app's performance.

I am also successfully able to limit columns from related objects. My question is, can I further limit columns from a related object that belongs to a related related object.

proj = { "OwnerID":{"FirstName":1, "Lastname":1}} // This works

proj = { "OwnerID":{"FirstName":1, "Lastname":1, "Picture":{ "Photo1" : 1 }}} // This does not work

Why not?


Limit Fields to Return from a Query - MongoDB

Posted: Tue Jul 29, 2014 11:42 pm
by Yurii Orishchuk

Hi Bahar,

I've tested the case you've described above.

And got correct results.

Here is my fields:

pre

include: owner,owner.SuperUser

proj: {name: 1, owner: {user_name: 1, SuperUser: {username: 1} } }

/pre

May be you forget to add "OwnerID.Picture" to include field?

See details on the screen shot: http://prntscr.com/47nlb3/direct

Regards.


Limit Fields to Return from a Query - MongoDB

Posted: Wed Jul 30, 2014 3:08 am
by bahar.wadia

Thank you, that works.

However, exclude does not work in the same way. For example change all the 1s to 0s and you don't get the opposite result. Do you know why?


Limit Fields to Return from a Query - MongoDB

Posted: Wed Jul 30, 2014 11:06 pm
by Yurii Orishchuk

Hi Bahar,

I've checked it and see some errors, reported a bug to our developers.

Sorry for this inconvenience. We will update you here when it will be fixed.

Regards


Limit Fields to Return from a Query - MongoDB

Posted: Mon Jul 06, 2015 9:05 am
by Dongzhi Yang7528784

Hi Maryna,

Could you provide more details regarding projection? can not find related information in the above link.

Thanks

Dongzhi


Limit Fields to Return from a Query - MongoDB

Posted: Tue Jul 07, 2015 4:34 am
by Yurii Orishchuk

Hi Dongzhi,

Please find this information here: https://devcenter.appery.io/documenta...

Regards.


Limit Fields to Return from a Query - MongoDB

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

Thanks Yurii. I understood.