7
All my documents in a Mongodb database have a field __v
, what it means?
> db.speeds.find({}).limit(2).pretty()
{
"_id" : ObjectId("586826f700890738a5e8cb3d"),
"remoteId" : 1,
"first" : ObjectId("586826f700890738a5e8cb3a"),
"second" : ObjectId("586826f700890738a5e8cb3b"),
"third" : ObjectId("586826f700890738a5e8cb3c"),
"__v" : 0
}
{
"_id" : ObjectId("5868270c6a16ce38d79f8af7"),
"remoteId" : 2,
"first" : ObjectId("5868270c6a16ce38d79f8af4"),
"second" : ObjectId("5868270c6a16ce38d79f8af5"),
"third" : ObjectId("5868270c6a16ce38d79f8af6"),
"__v" : 0
}
You use Mongoose to make the CRUD?
– marcollahc
Yes, I use Mongoose.
– relaxeaza
I don’t remember what it is exactly, but it has something to do with the version of the record. From a read in this post here: http://stackoverflow.com/questions/12495891/what-is-the-v-field-in-mongodb
– marcollahc