You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been seeing an error when using the sails-memory adapter with models that don't explicitly specify
unique: false
It seems in the enforceUniqueness function in database.js, the call do attrDef.unique is returning a function that returns an empty array rather than a value in the case of not having the unique key explicitly specified in the model.
This causes this line of code
if(!attrDef.unique) continue;
to always evaluate to true, rather than skipping over those attributes that do not have the uniqueness key. It this an issue with the way I am defining my model? Or is it supposed to return a function when there is no key present?
Hi,
I've been seeing an error when using the sails-memory adapter with models that don't explicitly specify
It seems in the
enforceUniquenessfunction indatabase.js, the call doattrDef.uniqueis returning a function that returns an empty array rather than a value in the case of not having the unique key explicitly specified in the model.This causes this line of code
to always evaluate to true, rather than skipping over those attributes that do not have the uniqueness key. It this an issue with the way I am defining my model? Or is it supposed to return a function when there is no key present?