bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

Limit Fields to Return from a Query - MongoDB

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...

obullei
Posts: 0
Joined: Thu Jun 05, 2014 12:17 am

Limit Fields to Return from a Query - MongoDB

Hello!

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Limit Fields to Return from a Query - MongoDB

Hello!

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

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

Limit Fields to Return from a Query - MongoDB

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?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Limit Fields to Return from a Query - MongoDB

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.

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

Limit Fields to Return from a Query - MongoDB

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?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Limit Fields to Return from a Query - MongoDB

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

Dongzhi Yang7528784
Posts: 0
Joined: Mon May 11, 2015 6:28 am

Limit Fields to Return from a Query - MongoDB

Hi Maryna,

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

Thanks

Dongzhi

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Limit Fields to Return from a Query - MongoDB

Hi Dongzhi,

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

Regards.

Dongzhi Yang7528784
Posts: 0
Joined: Mon May 11, 2015 6:28 am

Limit Fields to Return from a Query - MongoDB

Thanks Yurii. I understood.

Return to “Issues”