Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13037 closed defect (fixed)

ObjectStore unresolved jr, dirtyObject variables, etc.

Reported by: bill Owned by: Kris Zyp
Priority: high Milestone: 1.7
Component: Data Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

jr is apparently undefined in:

dojo.connect(kwArgs,"onError",function(){
	if(kwArgs.revertOnError !== false){
		var postCommitDirtyObjects = dirtyObjects;
		dirtyObjects = savingObjects;
		var numDirty = 0; // make sure this does't do anything if it is called again
		jr.revert(); // revert if there was an error
		self._dirtyObjects = postCommitDirtyObjects;
	}
	else{
		self._dirtyObjects = dirtyObject.concat(savingObjects);
	}
});

Presumably that means you are missing a test for revert.

Also setting numDirty is meaningless, and slightly above this code there's a var alreadyRecorded = {}; variable that's never used.


dirtyObject on the second-to-last line of this code is also undefined:

dojo.connect(kwArgs,"onError",function(){
	if(kwArgs.revertOnError !== false){
		var postCommitDirtyObjects = dirtyObjects;
		dirtyObjects = savingObjects;
		var numDirty = 0; // make sure this does't do anything if it is called again
		jr.revert(); // revert if there was an error
		self._dirtyObjects = postCommitDirtyObjects;
	}
	else{
		self._dirtyObjects = dirtyObject.concat(savingObjects);
	}
});

Change History (6)

comment:1 Changed 8 years ago by bill

Description: modified (diff)
Summary: ObjectStore unresolved jr variableObjectStore unresolved jr, dirtyObject variables

comment:2 Changed 8 years ago by bill

Description: modified (diff)
Summary: ObjectStore unresolved jr, dirtyObject variablesObjectStore unresolved jr, dirtyObject variables, etc.

comment:3 Changed 8 years ago by Kris Zyp

Resolution: fixed
Status: newclosed

(In [25128]) Fix and test revert method in ObjectStore?, fixes #13037

comment:4 Changed 8 years ago by bill

Milestone: tbd1.7
Resolution: fixed
Status: closedreopened

Thanks. But dirtyObject is still referenced (but undefined), isn't it?

comment:5 Changed 8 years ago by Kris Zyp

Resolution: fixed
Status: reopenedclosed

(In [25136]) Found errant dirtyObject variable, fixes #13037 !strict

comment:6 Changed 8 years ago by bill

No, it's still broken. But I'll leave this ticket closed since it's a duplicate of #10615.

Note: See TracTickets for help on using tickets.