Search code examples
ibm-mobilefirstjsonstore

Worklight JSONStore initCollection Error


envrionment:

  • Worklight v5.0.5

When I used the character starts from digit(ex. 0, 9) or _ as the collection name, PERSISTENT_STORE_FAILURE error occurred.

code like below

var name = '0aaa';
WL.JSONStore.initCollection(name, searchfields, [options]);

Solution

  • You need to start JSONStore collections with a letter [A-Z]+ or [a-z]+. For example: aaa instead of 0aaa. I have opened a bug to look into allowing collections to start with number and symbols for future releases of JSONStore.