fetch _id from javascript listcallback

283 views
Skip to first unread message

sivak...@gmail.com

unread,
Aug 18, 2014, 5:46:06 PM8/18/14
to suppor...@runmyprocess.com
Hi,

The javascript listcallback does not return the "_id" field of my document. I don't want to use the options as I want all the fields including "_id". I could not find this in the document. Can you please guide me on how to get the _id?

Thank you!

Regards,
Siva

thoshino

unread,
Aug 18, 2014, 5:59:26 PM8/18/14
to suppor...@runmyprocess.com, sivak...@gmail.com
Hi Siva,

In case you wanted to use the _id column as out-of-the-box unique id for each object, it is not recommended to do so.
Please use a customized unique field for your collections.

If you are talking about aggregation, you should be able to retrieve _id objects using $project pipeline.

I hope this helps,

Taka

sivak...@gmail.com

unread,
Aug 18, 2014, 10:28:33 PM8/18/14
to suppor...@runmyprocess.com, sivak...@gmail.com
Hi Taka,

Thanks for your reply!

I am not sure why it is not recommended but I will find a way to identify the objects.

Regards,
Siva

Reply all
Reply to author
Forward
0 new messages