Ticket #5743 (closed defect: fixed)

Opened 5 months ago

Last modified 5 months ago

ItemFileWriteStore chokes with reverting deletedItems

Reported by: benschell Owned by: jaredj
Priority: normal Milestone:
Component: Data Version: 1.0
Severity: normal Keywords:
Cc:

Description

I've attached a test case. Using an existing data set, the organization is as follows:

Africa
|
|-----------|
Kenya     Egypt 
|
Nairobi

If you delete Egypt and Nairobi (doesn't matter the order), then attempt to revert the store and execute a new query, IFWS throws an error. In the given example, the _S (reference to the store) on the Kenya item has gone to null.

If referenceIntegrity is turned off, there are no issues.

Attachments

IFRS_bug.html (2.0 kB) - added by benschell 5 months ago.
dojo.data.ItemFileWriteStore_20080204.patch (9.2 kB) - added by jaredj 5 months ago.
dojo_1.0.X_dojo.data.ItemFileWriteStore_20080204.patch (9.5 kB) - added by jaredj 5 months ago.
Backport of fix from 1.1 + alternate testcase for issue.

Change History

Changed 5 months ago by benschell

Changed 5 months ago by jaredj

Located the problem. It's in the handling of modifiedItems and keeping the array of top level items consistent. The wring index was being used. Simple fix, turns out. Patch forthcoming.

Changed 5 months ago by jaredj

Changed 5 months ago by jaredj

Updated patch to include a unit test for this problem. Will commit after running tests against multiple browsers as well as doh via rhino turns up clean.

Changed 5 months ago by jaredj

Browsers tested:

FireFox? 2.0.0.11: PASSED.

FireFox? 1.5.0.12: PASSED.

IE 6.0: PASSED.

IE 7.0: PASSED.

Opera 9.2: PASSED.

SeaMonkey? 1.1.2: PASSED.

Safari B3: PASSED.

D.O.H. executed with Rhino (commandline): PASSED.

Changed 5 months ago by jaredj

(In [12275]) Fix to ItemFileWriteStore? for reversion bug. refs #5743 !strict

Changed 5 months ago by jaredj

(In [12276]) Fix comment typo. refs #5743 !strict

Changed 5 months ago by jaredj

Backport of fix from 1.1 + alternate testcase for issue.

Changed 5 months ago by jaredj

Dojo 1.0.X tested on:

Browsers tested:

FireFox?? 2.0.0.11: PASSED.

FireFox?? 1.5.0.12: PASSED.

IE 6.0: PASSED.

IE 7.0: PASSED.

Opera 9.2: PASSED.

SeaMonkey?? 1.1.2: PASSED.

Safari B3: PASSED.

D.O.H. executed with Rhino (commandline): PASSED.

Changed 5 months ago by jaredj

  • status changed from new to closed
  • resolution set to fixed

(In [12277]) Backport of fix to revert code. fixes #5743 !strict

Note: See TracTickets for help on using tickets.