You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In branch 26.nodejs-mondodb ,in 06-updating-documents/routes/blog.js,
in the blog,js file we created a GET route "/posts/:id/edit" to get a specific post from the post collection so that we can later populate a 'update-post' html page for the users to edit their posts.
We used projection in the find() method to only get a few parts from a post.Because getting all parts of a post is not necessary.But the projection is not working.It is getting all the information about a post.
For example:
Here we set the projection to get only title,body and summary.But when I console log it I get all the infromation about a post!!
Is there something wrong with the projection??
The text was updated successfully, but these errors were encountered:
In branch 26.nodejs-mondodb ,in 06-updating-documents/routes/blog.js,
in the blog,js file we created a GET route "/posts/:id/edit" to get a specific post from the post collection so that we can later populate a 'update-post' html page for the users to edit their posts.
We used projection in the find() method to only get a few parts from a post.Because getting all parts of a post is not necessary.But the projection is not working.It is getting all the information about a post.
For example:
Here we set the projection to get only title,body and summary.But when I console log it I get all the infromation about a post!!
Is there something wrong with the projection??
The text was updated successfully, but these errors were encountered: