ConstraintError: Key already exists in the object store

624 views
Skip to first unread message

Md Mostofa

unread,
May 17, 2018, 3:21:04 PM5/17/18
to Dexie.js

I am working with React 16.3.2Redux 4 and Dexie 2.0.3.


when I am going to store data second time it throws this error message.


Error: ConstraintError: Key already exists in the object store.


   return dispatch => {
        db.table
        .add(data)
        .then (function(id){
            console.log(id)
        })
        .catch (function (error) {
            console.log("Error: " + error);
        });
    }


The first time it stores date well but after it gives the error.


StackOverflow Questions Link
Reply all
Reply to author
Forward
0 new messages