sircody01
sircody01
@mhombach Interesting you're unable to reproduce this. It reproduces 100% reliably in my Angular app. Maybe it has something to do with the schema I'm using. I'll investigate this further...
Got it! It has something to do with having an index. Once I removed my index from the collection, then deleteOne started returning the result value I expected. Try this:...
Oh, and I forgot to mention I am using mongoose-valid8 v1.3.1.
Also I'm creating the connection differently: ``` async function run() { await mongoose.connect(connectionString, { useNewUrlParser: true, useCreateIndex: true }); await mongoose.connection.dropDatabase(); const userSchema = new Schema({ name: { type: String,...
@mhombach I appreciate your efforts trying to repro this! Is it possible the version of MongoDB has something to do with it? I'm using MongoDB 4.0.4 on Windows. What version...
Hi, not yet. 😄 It's only 7am here... I'm just starting my day. I will later on.
@mhombach No repro using your suggested code, even while using the exact same physical node_modules files. I'm now trying to figure out what's the difference because it still repro's 100%...
Here's your repro. Note it's intermittent. Sometimes it does work as expected, but most of the time it does not work as expected: ``` const mongoose = require("mongoose"); const {...
Yes! Modifying my code per your suggestion does work reliably. I still don't understand why my original code doesn't work as expected. I confess I'm very new to NodeJS and...
I would like to use a size attribute also, or something equivalent.