Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#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:


  • 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 ben hockey

a dump of the appropriate records in the store:


comment:2 Changed 13 years ago by Kris Zyp

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:3 Changed 13 years ago by Kris Zyp

Resolution: fixed
Status: newclosed

(In [15269]) fixes #7673

comment:4 Changed 13 years ago by Kris Zyp

(In [15296]) fixes #7673 by properly updating data based on response from PUT, POSTs. Fixes setting non-truthy values with setValue Fixes adding and deleting an item in one transaction

comment:5 Changed 13 years ago by dante

Milestone: tbd1.2
Note: See TracTickets for help on using tickets.