uuid-mongodb
uuid-mongodb copied to clipboard
MUUID.from() fails with CastError
v2.4.3 introduces:
CastError: Cast to Buffer failed for value "new Binary(Buffer.from("bd8b82fd91604ebc8010f5026c0b1644", "hex"), 4)" at path "centre" for model "Queue"
The code where it fails is as simple as:
const rows = await MQueue.find({
centre: MUUID.from(uuid),
deletedAt: null
})
I can confirm that reverting to v2.4.2 fixes the issue
I have this problem with mongoose 6.0.5. Working with 5.12.2.
uuid-mongodb 2.4.2 doesn't fix this.
So... npm i [email protected] ;-)