Confirmation of the return type

9 views
Skip to first unread message

J Long

unread,
Oct 6, 2015, 12:22:50 PM10/6/15
to Mongoose Node.JS ODM
Hi,

I'm cleaning up some code and I want to confirm the following:

1. All read queries with the lean attribute applied returns a JavaScript object
2. All findByIdAndUpdate | update | create returns JavaScript object

Wasnt able to find definitive documentation to support this.

Thanks.

J

J Long

unread,
Oct 6, 2015, 12:45:12 PM10/6/15
to Mongoose Node.JS ODM
So from looking at the source code it save | FindByIdAndUpdate returns a query object.
Reply all
Reply to author
Forward
0 new messages