I`m using dexie wrapper library for indexedDB. I tried several ways to store objects in as Compound index in a table. Here is my table .
db.version(1).stores({
groupmap:"[g1+g2+g3],[g1+g2+g3+mdno],g1,g2,g3,active,mddate,mdno"
});
Here is what I tried. But its not successful. and given error "DataError: Failed to execute 'only' on 'IDBKeyRange': The parameter is not a valid key. Error: Failed to execute 'only' on 'IDBKeyRange': The parameter is not a valid key"
var g1Obj=new Object();
g1Obj["id"]=1
g1Obj["name"]="Breakfast"
var g2Obj=new Object();
g2Obj["id"]=1
g2Obj["name"]="Burger"
var g3Obj=new Object();
g3Obj["id"]=1
g3Obj["name"]="Chicken Burger"
var obj = new Object();
obj['g1']=g1Obj
obj['g2']=g2Obj
obj['g3']=g3Obj
obj['mddate']=formatDateSecond4(new Date());
obj['mdno']=formatDateSecond5(new Date());
obj['active']=parseInt(1);
db.transaction('rw',db.groupmap, function () {
db.groupmap.add(dataObj);
console.log ("[Group Map] Record saved to Local");
}).catch(function (e) {
console.log ("[Group Map] Faild to save Record :"+e.message);
});