indexeddb - Uncaught ydn.error.ArgumentException: require index "Account__c,PrimaryContact__c" not found in store "contactRole" store.js line 1284 -


i have following:

ydbstorage = new ydn.db.storage(dbname, schema);

/** @param values - array of keys . e.g. ['account1', 'city1'] @param index - string of index value . e.g. 'account, city' @description - records based on compound index. remember indexes not created boolean values */ var getrecordsoncompoundindex = function(store_name, index, values, success_callback, failure_callback) {   console.log('inside getrecordsoncompoundindex');   if(!store_name || ! index || !values) {       failure_callback();   } else {   var keyrange = ydn.db.keyrange.only(values);       ydbstorage.values(new ydn.db.indexvalueiterator(store_name, index, keyrange)).done(function(response) {         if(!response){             failure_callback();         }else{             success_callback(response);         }       });   } }  $scope.getaccountkeycontact = function() {   var indexes = 'account__c,primarycontact__c';   var values = [accountid, "true"];   ydbdatabase.getrecordsoncompoundindex('contactrole', indexes, values, function(records) {     //console.log('keycontact role : ', records);      ydbdatabase.getrecordonid('contacts', records[0].contact__c, function(record) {       $scope.outlet.keycontact = record;       $scope.outlet.keycontact.designation = records[0].role__c;       $scope.$apply();     }, function() {       console.log('could not keycontact');     });    }, function() {     console.log('could not contactrole role');   }); } 

contactrole indexeddb store

i getting following error in spite of compound index being present.

uncaught ydn.error.argumentexception: require index "account__c,primarycontact__c" not found in store "contactrole"

can't figure out wrong. suggestions. error line ydbdatabase.getrecordsoncompoundindex

are sure have compound index describe here. should like:

var schema = { store: [{     name: 'contactrole',     indexes: [{       name: 'accuntcontact',       keypath: ['account__c', 'primarycontact__c']     }]   }] }; 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -