P
P
postya2020-01-02 11:26:29
MongoDB
postya, 2020-01-02 11:26:29

How to remove version key from Nest app in Mongo DB?

I use Nest JS, Mongoose, Mongo DB
When getting and adding records, they have an additional field _v
How to remove or hide this field?

5ff02e3055d3e604752279.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmytrii, 2021-02-07
@postya

In the @Schema() decorator, add additional options @Schema({ versionKey: false })

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question