After debugging and testing out automigrate, the autoupdate doesn't work nicely.
adding these lines to the built javascript fixes the problem, although not clean
var details = {};
typeof(index.fields) === 'undefined' ? details.fields = Object.keys(index.keys) : details.fields = [index.fields];
details.type = 'hash';
return collection.createIndex(index.fields || index.keys, index.options, indexCallback);
The callback passed isn't a function apparently.
Also, the isActual function always returns true, I expected the behaviour to return false if the model's json was modified, am I wrong ?
After debugging and testing out automigrate, the autoupdate doesn't work nicely.
adding these lines to the built javascript fixes the problem, although not clean
var details = {};typeof(index.fields) === 'undefined' ? details.fields = Object.keys(index.keys) : details.fields = [index.fields];details.type = 'hash';return collection.createIndex(index.fields || index.keys, index.options, indexCallback);The callback passed isn't a function apparently.
Also, the isActual function always returns true, I expected the behaviour to return false if the model's json was modified, am I wrong ?