{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/loopback-connector-redis/issues/7","labels_url":"https://api.github.com/repos/strongloop/loopback-connector-redis/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback-connector-redis/issues/7/comments","events_url":"https://api.github.com/repos/strongloop/loopback-connector-redis/issues/7/events","html_url":"https://github.com/strongloop/loopback-connector-redis/pull/7","id":104677200,"number":7,"title":"fix destroyAll() with no WHERE filter","user":{"login":"xrstf","id":127499,"avatar_url":"https://avatars.githubusercontent.com/u/127499?v=3","gravatar_id":"","url":"https://api.github.com/users/xrstf","html_url":"https://github.com/xrstf","followers_url":"https://api.github.com/users/xrstf/followers","following_url":"https://api.github.com/users/xrstf/following{/other_user}","gists_url":"https://api.github.com/users/xrstf/gists{/gist_id}","starred_url":"https://api.github.com/users/xrstf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xrstf/subscriptions","organizations_url":"https://api.github.com/users/xrstf/orgs","repos_url":"https://api.github.com/users/xrstf/repos","events_url":"https://api.github.com/users/xrstf/events{/privacy}","received_events_url":"https://api.github.com/users/xrstf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-03T12:11:49Z","updated_at":"2016-01-16T01:45:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/strongloop/loopback-connector-redis/pulls/7","html_url":"https://github.com/strongloop/loopback-connector-redis/pull/7","diff_url":"https://github.com/strongloop/loopback-connector-redis/pull/7.diff","patch_url":"https://github.com/strongloop/loopback-connector-redis/pull/7.patch"},"body":"My application is doing\r\n\r\n    app.models.Something.destroyAll(done);\r\n\r\nas the beforeEach hook in my mocha tests. This works perfectly fine for MySQL and MongoDB, but fails with Redis. Apparently, the \"do we have a where filter?\" check incorrectly sees an empty object as a valid filter.\r\n\r\nThis PR applies the same logic as is already implemented in ``count()`` (see a few lines below in the code) to ``destroyAll()``."},"comment":{"url":"https://api.github.com/repos/strongloop/loopback-connector-redis/issues/comments/172144912","html_url":"https://github.com/strongloop/loopback-connector-redis/pull/7#issuecomment-172144912","issue_url":"https://api.github.com/repos/strongloop/loopback-connector-redis/issues/7","id":172144912,"user":{"login":"superkhau","id":1617364,"avatar_url":"https://avatars.githubusercontent.com/u/1617364?v=3","gravatar_id":"","url":"https://api.github.com/users/superkhau","html_url":"https://github.com/superkhau","followers_url":"https://api.github.com/users/superkhau/followers","following_url":"https://api.github.com/users/superkhau/following{/other_user}","gists_url":"https://api.github.com/users/superkhau/gists{/gist_id}","starred_url":"https://api.github.com/users/superkhau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superkhau/subscriptions","organizations_url":"https://api.github.com/users/superkhau/orgs","repos_url":"https://api.github.com/users/superkhau/repos","events_url":"https://api.github.com/users/superkhau/events{/privacy}","received_events_url":"https://api.github.com/users/superkhau/received_events","type":"User","site_admin":false},"created_at":"2016-01-16T01:45:15Z","updated_at":"2016-01-16T01:45:15Z","body":"@slnode test please"}}