Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#14281 closed defect (fixed)

dojo/store/Memory - assign id when adding objects without ids

Reported by: ben hockey Owned by: Kris Zyp
Priority: high Milestone: 1.8
Component: Data Version: 1.7.0
Keywords: Cc:
Blocked By: Blocking:

Description

using a Memory store, i would expect the following to work:

var store = new Memory(),
    ukObject = {name:'UK', type:'country', parent: 1},
    ukID = store.add(ukObject);

// identity is returned as undefined
store.getIdentity(tree.store.get(ukID));

this happens because even though store.add is returning an id, the object being added is not assigned the id.

Change History (3)

comment:1 Changed 7 years ago by Kris Zyp

Resolution: fixed
Status: newclosed

In [27072]:

Record generated id in object, fixes #14281 !strict

comment:2 Changed 7 years ago by bill

Milestone: 1.8

comment:3 Changed 7 years ago by Simon Speich

This also fixes #12835

Note: See TracTickets for help on using tickets.