enumerate retrieved (not skipped) fields

5 views
Skip to first unread message

qMax

unread,
Apr 16, 2013, 11:08:52 AM4/16/13
to mongoeng...@googlegroups.com
Hi.

When i retrieve documents with query.only(somefields), the retrieved documents still has all attributes for skipped fields, 
with values set to None, False, or empty lists, empty strings.

Is there a way to figure out which fields were actually retrieved ?

Ross Lawley

unread,
Apr 16, 2013, 3:40:57 PM4/16/13
to mongoeng...@googlegroups.com
You could use the _data dictionary but otherwise it would have to be in the app logic.

Ross


--
You received this message because you are subscribed to the Google Groups "MongoEngine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongoengine-us...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages