#nUpserted not showing when upsert

1 messages · Page 1 of 1 (latest)

wraith lodge
#

I do mongo db upsert, but the nUpserted message does not appear. When I looked at the data, I saw that it was nUpserted, but it does not appear in the return value.

WriteResult({ nMatched: 1, nUpserted: 1, nModified: 0 });

hollow wraithBOT
#

Hi There!
Thanks for reaching out to us. One of our engineer will be with you shortly.

If you are stuck with an issue/error, please help us with following information.

  1. Which version of Appsmith are you on?
  2. Provide screenshots/screen recordings of the original error/code snippet.
  3. Add details about your use case and provide steps to reproduce the issue, if
    possible.
wraith lodge
#
  1. This is the self-hosted version
  2. Screenshot provided
  3. You can use the query below.

||{
"update": "newPage_history",
"updates": [
{
"q": {
"_id": {{query_select_newPage.data[0]._id}}
},
"u": { "$set": { "pages": "{{ query_select_newPage.data }}" } },
"upsert":true
}
]
}||

hollow wraithBOT
#

What is the data type of the _id?

wraith lodge
#

ObjectId

hollow wraithBOT
#

Can you send a screenshot of the evaluated value of the query?

wraith lodge
hollow wraithBOT
#

The evaluated value pops up if you click inside the query? Can you send a
screenshot of that one?

wraith lodge
#

Uh.. I handled it the other way. I'll quit

hollow wraithBOT
#

Is the issue resolved now?

wraith lodge
#

The issue hasn't been resolved, but I made it so that I didn't have to personally check it.