0

I have a bit of code:

db.files.update(id, {name: name}).then(function(updated) {
    // Other stuff
}

When it runs, it replaces the entire record with

{
    name: "File name"
}

According to the docs, this is what Table.put() should do, not Table.update().

Am I doing something wrong, or is this a problem with Dexie?

  • Please make this into a [mcve] that shows how you initialize the database, how you perform the update, and how you check your values afterwards. – Louis Aug 28 '17 at 23:03
  • @Louis, sorry about that. I realized that I was accessing an array of data pulled from the Dexie database that wasn't properly setting all the data when it was initialized. As I suspected, it was my own problem. – Nate St. George Aug 28 '17 at 23:26

0 Answers0