Environment: Worklight Studio 6.1 on Windows. I want to confirm our understanding of using the JSONStore.init() method. This is following on from this question that establishes that when calling init() to reopen a store we must pass the exact same parameters as when we init-ed the store for the first time.
The question now is exactly when we should be calling init(), and whether we can cause any problems by accidentally calling init() multiple times. This may seem obvious but we are trying to diagnose some error conditions and one possible cause is that we might be calling init() too often.
My expectation is that the requirement is that in any given execution of an application using JSONstore collections must call init() for each collection (perhaps by calling init() with a list of collections) and that a reasonable model is to is to do that at application startup. This is based on my reading of the docs JSONstore.init.
Please could we confirm that from that point on we can :
a). use methods such as JSONStore.get() freely with no further init() calls being needed.
b). should we invoke init() again for an already initialised collection there should be no side effects.
The symptom we appear to have is that sometimes a second call to init() results in an error message
PROVISION_TABLE_SEARCH_FIELDS_MISMATCH in worklight.js at line 4556
although so far as we can see we always call init() using indentical collection parameters.