mongoose-double
mongoose-double copied to clipboard
double type not working it store int instead of double bson?
It stores int
type instead of double.
import mongoose, { Schema } from "mongoose"
import Double from "../CustomTypes/Double"
export const ProductVariantEmbeddedSchema = new Schema({
price: Double,
discount: Double,
isAvailable: Boolean,
quantity: Number,
maximumToBook: Number,
})
Same here...
solved by using decimal128
This still seems to be happening. Any pointers on what to check in this code? I'm fine making a patch if no one is available actively maintaining this.
Traced this down to the removal of valueOf. When I add valueOf back, the issue is resolved. I also have a very repeatable example to test with if anyone is interested. Will adding valueOf back break anything?
Traced this down to the removal of valueOf. When I add valueOf back, the issue is resolved. I also have a very repeatable example to test with if anyone is interested. Will adding valueOf back break anything?
Hi @MattLJoslin , can you please provide pointers where we need to add valueOf. I am a beginner in this area. It would be of great help if you can share the code snippet.