Hi all,
Why is it that if I want to do a upsert, the values are replaced and not added to the document.
Database is travel-sample and id is airline_10.
{
“callsign”: “MILE-AIR”,
“country”: “United States”,
“icao”: “MLA”,
“id”: 10,
“name”: “40-Mile Air”,
“type”: “airline”
}
In the Couchbase query editor i run the following query:
UPSERT INTO travel-sample
(KEY, VALUE) VALUES (“airline_10”, {
“description”: “This is a 40-Mile Air description”
})
RETURNING *
Return gets me:
“travel-sample”: {
“description”: “This is a 40-Mile Air description”
}
Instead of:
{
“description”: “This is a 40-Mile Air description”
“callsign”: “MILE-AIR”,
“country”: “United States”,
“icao”: “MLA”,
“id”: 10,
“name”: “40-Mile Air”,
“type”: “airline”
}
I understand that an upserts adds a key value to a existing document, but I cannot get this to work,
What am I doing wrong?