Closed
Description
This is more an "annoyance" than a bug and could possibly be fixed quickly. If an array of numbers is used in a filter, it's values will get modified once used in a query:
var arrayOfNumbers = [1, 2];
app.models.MyModel.find({
where: {
myId: {
inq: arrayOfNumbers
}
}, function(err, myModels) {
console.log(typeof arrayOfNumbers[0]); // "string"
});
This is annoying, if the array is required for further tasks later on. Work-around:
inq:arrayOfNumbers.slice()
Here a repo to replicate the issue: https://github.com/hotaru355/issue1287
Metadata
Metadata
Assignees
Labels
No labels