I have a simple model like this:
const model = {
image: {
smallImage: {type: Schema.ObjectId, ref: 'Images', default: null,required: true},
hoverImage: {type: Schema.ObjectId, ref: 'Images'}
}
};
as you can see, hoverImage
is optional, but when i want save null
in hoverImage
I get the an Error.
via Alireza Valizade
No comments:
Post a Comment