Opened 9 years ago
Closed 8 years ago
#14084 closed defect (wontfix)
JsonRestStore.isDirty() returns same value for all stores.
Reported by: | Razvan Lungu | Owned by: | Kris Zyp |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | DojoX Data | Version: | 1.6.1 |
Keywords: | store dirty | Cc: | |
Blocked By: | Blocking: |
Description
When using two or more JsonRestStore? instances isDirty() will return the same result for both stores.
let's consider we have to clean jsonRestStores:
Doing a clean fetch will show both stores as not dirty (isDirty() == false), but changing one or more items in jsonRestStore_01 will mark both stores as dirty (isDirty() == true for both stores) even though nothing was changed in jsonRestStore_02.
Using save() on jsonRestStore_02 won't trigger a POST or PUT request, but doing it on jsonRestStore_01 (the one that has actually been modified) will result in a POST/PUT request.
After doing jsonRestStore_01.save() both stores will be clean again.
This scenario was tested with different store dataproviders returning items with their IDs set properly. The same behavior is noticed when using both sync/async modes.
Using multiple asynchronous stores is almost impossible since I can't keep track of when the real dirty stores finish saving.
Test environment:
Browser: FireFox? 7.0 OS: Windows 7 x64 Steps: instantiate two JsonRestStores?, fetch() on them, .changing() on one store's item, check .isDirty() on both stores. E-mail: [email protected]…
Attachments (3)
Change History (5)
Changed 9 years ago by
comment:1 Changed 9 years ago by
Owner: | changed from Jared Jurkiewicz to Kris Zyp |
---|---|
Priority: | high → normal |
comment:2 Changed 8 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
dojox/data is abandoned. Some dojox/data stores have been upgraded to use the Dojo Store API and can be found at https://github.com/kfranqueiro/dojo-smore.
dojo code