during the creation of the schema, there is no notation that says "in the case of a null field or not present to assign them a default"
example:
when I define a mongo scheme
new Schema({
count: { type: Number, default: 0 }
});
I also want that when I don't pass the field the value of default appears in the object.
Expected behavior
@DefaultValue(0)
int count;
Actual behavior
every time I send the object I initialize the field to let me add in mongo.
during the creation of the schema, there is no notation that says "in the case of a null field or not present to assign them a default" example: when I define a mongo scheme
I also want that when I don't pass the field the value of default appears in the object.
Expected behavior
Actual behavior
every time I send the object I initialize the field to let me add in mongo.
I also accept changes or suggestions.