[Dojo-checkins] [dojo] #5201: QueryReadStore: lastServerQuery object references serverQuery

dojo trac at dojotoolkit.org
Tue Nov 20 09:20:43 UTC 2007


#5201: QueryReadStore:  lastServerQuery object references serverQuery
------------------------+---------------------------------------------------
 Reporter:  guest       |       Owner:  jaredj
     Type:  defect      |      Status:  new   
 Priority:  normal      |   Milestone:  1.0.2 
Component:  DojoX Data  |     Version:  1.0   
 Severity:  normal      |    Keywords:        
------------------------+---------------------------------------------------
 Object reference in QueryReadStore can result to unexpected behavior. When
 store is queried for the first time, a reference to query object is
 stored:

 {{{
 this._lastServerQuery = serverQuery;
 }}}

 When querying the store for the second time with altered (not new)
 serverQuery object, no xhr-request is made, because they both point to the
 same object:

 {{{
 dojo.toJson(serverQuery)==dojo.toJson(this._lastServerQuery)
 }}}

 Storing a clone instead of a reference into lastServerQuery would fix
 this. So, how about mixing the serverQuery object into a new object?

-- 
Ticket URL: <http://trac.dojotoolkit.org/ticket/5201>
dojo <http://dojotoolkit.org/>
The Dojo UI Toolkit


More information about the Dojo-checkins mailing list