#5201 closed defect (fixed)
QueryReadStore: lastServerQuery object references serverQuery
Reported by: | guest | Owned by: | Jared Jurkiewicz |
---|---|---|---|
Priority: | high | Milestone: | 1.0.2 |
Component: | DojoX Data | Version: | 1.0 |
Keywords: | Cc: | [email protected]… | |
Blocked By: | Blocking: |
Description
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?
Attachments (1)
Change History (5)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
This seems a reasonable (and trivial) request to make. Cloning the query object via mixin is easy enough to do. Patch forcoming.
Changed 13 years ago by
Attachment: | dojox.data_QueryReadStore_serverQuery.patch added |
---|
Quick use of mixin to cllone a query
comment:3 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Will look at the suggestion next week (after Thanksgiving stuff, lots of relatives to deal with this week). Should be a trivial update.