Fix multiple use of notEqualTo (#2882)
* Add failing test for multiple .notEqualTo on relation with same class * Fix multiple .notEqualTo on relations with the same class Multiple should use the union of all objectIds not the intersect Fixes ParsePlatform/parse-server#1596
This commit is contained in:
committed by
Florent Vilmart
parent
d8ba9e8b7d
commit
b88b0c578f
@@ -127,6 +127,22 @@ describe('Parse.Query testing', () => {
|
||||
return query.find().then(function(results){
|
||||
equal(results.length, 0);
|
||||
});
|
||||
}).then(function(){
|
||||
var query = new Parse.Query(Cake);
|
||||
query.notEqualTo("hater", user2);
|
||||
query.notEqualTo("liker", user2);
|
||||
// user2 doesn't like any cake so this should be 0
|
||||
return query.find().then(function(results){
|
||||
equal(results.length, 0);
|
||||
});
|
||||
}).then(function(){
|
||||
var query = new Parse.Query(Cake);
|
||||
query.equalTo("hater", user);
|
||||
query.equalTo("liker", user);
|
||||
// user doesn't hate any cake so this should be 0
|
||||
return query.find().then(function(results){
|
||||
equal(results.length, 0);
|
||||
});
|
||||
}).then(function(){
|
||||
done();
|
||||
}).catch((err) => {
|
||||
|
||||
Reference in New Issue
Block a user