#7673 closed defect (fixed)
duplicate items in store when a new item's id is returned through Location header
Reported by: | ben hockey | Owned by: | Kris Zyp |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | DojoX Data | Version: | 1.2beta |
Keywords: | jsonreststore | Cc: | |
Blocked By: | Blocking: |
Description
- i add a new item to the store, it is automatically assigned an arbitrary id
- i save the store, the id assigned by the server is returned in the Location header
- an item with the new id is added to the store
- BUG: an item with the original arbitrary id is still in the store
with a grid attached to the store, the only item i see in the grid is the one with the arbitrary id - even after updating.
Change History (5)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Owner: | changed from Jared Jurkiewicz to Kris Zyp |
---|
Are you sure those are duplicate items? Does store._indexservice/calendar/414af6155494a3bc77422ccc? != store._indexservice/calendar/4855940?? I believe those are actually the same object, just registered in the store for both the client and server ids (so they are accessible by both). I believe there is a bug here (and I will fix it) that the "id" property is not updated, but this will not have any affect on the items identity as provided through the getIdentity method; it is essential that getIdentity continue to return the client assigned id, even after getting a server id, otherwise the grid will break (it can't handle mutating identities).
comment:4 Changed 13 years ago by
comment:5 Changed 13 years ago by
Milestone: | tbd → 1.2 |
---|
a dump of the appropriate records in the store: