Opened 14 years ago

Closed 14 years ago

#7990 closed defect (duplicate) querySuperSet function returns successful if query is not an object

Reported by: dustint Owned by: Jared Jurkiewicz
Priority: high Milestone: tbd
Component: DojoX Data Version: 1.2.0
Keywords: Cc:
Blocked By: Blocking:


Take the following example:{[Error: Query filter requires field and constraints separated by a "="]});{[Error: Query filter requires field and constraints separated by a "="]});

Now, when we call the fetch for the query of 2, we test to see if the queries are the same: argsSuper.query == argsSub.query, which won't evaluate to true because 1 != 2

However, then we try to mixin the query: dojo.mixin({},1) which doesnt make any sense, so we never get to the return false logic and end up returning the clientQuery, resulting in success.

To fix this, we should wrap the mixin and following code with tests to ensure the queries are actually objects. Eg:

if(typeof argsSub.query == 'object' && argsSub.query == 'object'){

var clientQuery = dojo.mixin({},argsSub.query); for(var i in argsSuper.query){

if(clientQuery[i] == argsSuper.query[i]){

delete clientQuery[i];

}else if(!(typeof argsSuper.query[i] == 'string' &&[i]).test(clientQuery[i]))){

return false;




return false;


Change History (2)

comment:1 Changed 14 years ago by dustint

This ticket is a duplicate of 7989. The server seemed like it messed up, but in the end created two. Sorry for the confusion

comment:2 Changed 14 years ago by Adam Peller

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.