Hello all and thank you for taking a look.
My issue is that I am able to save to the model in properties, but unable to retrieve those values back to the model.
Some code:
The model:
exports.definition = { config: { columns: { "industry": "Text", "email": "Text", "phone": "Text", "activation": "Text", }, adapter: { type: "properties", collection_name: "appState" } }, ... return Model; }, extendCollection: function(Collection) { _.extend(Collection.prototype, { // extended functions and properties go here }); return Collection; } };
The way it's instantiated:
Alloy.Globals.state = Alloy.Models.instance( 'appState' );How it's populated:
Alloy.Globals.state.set( 'activation', data.ActivationCode ); //... Alloy.Globals.state.save();And proof that it is saved in the appState entries:
[INFO] : ["appState-7e3c7832-df01-406f-f291-c328930e5e0e","appState-appState","appState-cc81dde7-2348-f90d-8b13-d878f1d720d7","appState-6168852d-04f2-e209-d05e-16a22a4da69d"]However, my attempt to pull out the values in the following way:
//pull app state information from properties should they exist Alloy.Globals.state.fetch();Do not work. How might I go about doing it?