zefhemel/persistencejs — Issue #78: Missing Documentation for 'in' Filter
Author: FrostbittenKing
Created: 2012-02-04 14:07:59+00:00
State: open

Would it be too much to ask to document what the 'in' filter actually expects? I'm pretty sure it expects an array. This is the only way this would make sense, but.... IT FKING DOESN'T WORK.
Little example:
var toRemove = Foo.all().filter('email','in',toRemoveArray);

toRemove.list(null,function(resultList) {
resultList.forEach(function(currentMail) {
persistence.remove(currentMail);
});
});

I stepped through this god knows how often in the debugger, but after .list is invoked, it never gets inside the callbackhandler ( function(resultList) ...), not to mention the forEach.
And, yes I set breakpoints on the foreach and persistence line. So, if this would actually work, the debugger would actually kick in on those lines of code.
The funny thing is, this worked a few weeks ago (I'm 99.99% sure of that). Since I haven't had the time to talk to my colleagues I can only assume they updated persistence.js some time ago and somewhere in-between the 'in' filter feature has been b0rked.