Opened 11 years ago

Closed 9 years ago

#11751 closed defect (wontfix)

PersevereStore Inconsistent Behavior

Reported by: crobe03 Owned by: Kris Zyp
Priority: high Milestone: tbd
Component: DojoX Data Version: 1.4.1
Keywords: persevere Cc:
Blocked By: Blocking:


When attempting the following code snippet:

var ps = new{target:"http://localhost/data/Client/"}); var newItem = ps.newItem({name:"Joe", email:"[email protected]", localPhoto:"/path/to/photo.png", photo:"/path/to/cdn/photo.png", children:[]});;

function deleteItem(from,filter) {

console.log("Filter:" + filter); var ds = new{target:"http://localhost/data/" + from + "/"}); ds.fetch({query: filter, onComplete: function(items){

console.log(items); dojo.forEach(

items, function(item, idx, arr) {

console.log(item, "at index:", idx);



}, onError: function(msg){console.log("we got screwed:" + msg); }});

} deleteItem("Client","?name='Joe'");

We end up receiving the following debug console sporadically (sometimes it works as expected): Filter:?name='Joe' edit-child.html:51we got screwed:Error: INVALID_STATE_ERR: DOM Exception 11 edit-child.html:578

Expected console logs (roughly):

Filter:?name='Joe' edit-child.html:35[ Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object ] edit-child.html:39 Object

"at index:" 0

edit-child.html:39 Object

"at index:" 1

edit-child.html:39 Object

"at index:" 2

edit-child.html:39 Object

"at index:" 3

edit-child.html:39 Object

"at index:" 4

edit-child.html:39 Object

"at index:" 5

edit-child.html:39 Object

"at index:" 6

edit-child.html:39 Object

"at index:" 7

edit-child.html:39 Object

"at index:" 8

edit-child.html:39 Object

"at index:" 9

edit-child.html:39 Object

"at index:" 10

edit-child.html:39 Object

"at index:" 11


Change History (4)

comment:1 Changed 11 years ago by Jared Jurkiewicz

Owner: changed from Jared Jurkiewicz to Kris Zyp

comment:2 Changed 11 years ago by crobe03

Just to confirm its in the dojox portion, we replicated functionality using a ruby client script like so:

#!/usr/bin/env ruby

require 'rubygems' require 'persevere' require 'pp'

p ='http://localhost:8080') new_item = { 'name' => 'Joe', 'email' => '[email protected]…', 'localPhoto' => '/path/to/photo.png', 'photo' => '/path /to/cdn/photo.png', 'children' => [] } result = p.create('/data/Client/', new_item) joes = JSON.parse(p.retrieve('/data/Client/?name="Joe"').body) joes.each do |joe|

res = p.delete('/data/Client/' + joeid?.to_s) pp :res => res


And it produces the desired effect:

:!./test.rb {:res=>


@body=nil, @code="204", @location=nil, @message="No Content">}

comment:3 Changed 9 years ago by bill

Milestone: tbd

comment:4 Changed 9 years ago by dylan

Resolution: wontfix
Status: newclosed has been deprecated by dojo/store. PersevereStore? should now just use dojo/store/JsonRest instead, or a custom store.

Note: See TracTickets for help on using tickets.