InsertOne result is acknowledged true and an inserted Id but nothing is persisted on the collection

Hi, I’m new using mongo , and I’m in need for help

the result of the insertOne:
{
acknowledged: true,*
insertedId: new ObjectId(“63f15abc4a9576b16ec5649c”)*
}
I do have the collection created on my database

what am I missing?
There is no error shown, how can I understand what is happening?

Hello @Stephanie_G, Welcome to the MongoDB community forum,

Possibility of incorrect database name or collection name, can you show the screenshot of your code and result in sequence,

  1. find()
  2. insertOne()
  3. find()

Where you are executing these commands? can you please try connecting the mongo shell and execute these commands?

1 Like