Opened 11 years ago

Closed 10 years ago

#13418 closed defect (wontfix) requires a item as first argument, but not passed in

Reported by: William Riley Owned by: Kris Zyp
Priority: high Milestone: tbd
Component: Data Version: 1.7.0b1
Keywords: Cc:
Blocked By: Blocking:


From line 39 of dojo/data/api/Identity.js:

getIdentityAttributes: function(/* item */ item){

The 'item' argument is required, and is used in the XmlStore? implementation under, but if we look at line 135 of dojo/store/DataStore.js:

return object[this.idProperty ||[0]];

the item argument isn't being passed, thus using a with a breaks when calling DataStore?.getIdentity()

I would have provided a patch, but it doesn't look like there's any non-asynchronous way of mapping a store object to a data object, so I'm not sure what the best way to solve the problem would be.

Change History (2)

comment:1 Changed 11 years ago by Jared Jurkiewicz

Owner: changed from Jared Jurkiewicz to Kris Zyp

comment:2 Changed 10 years ago by Kris Zyp

Resolution: wontfix
Status: newclosed

The identity of the object should be stored in the object in the property named by the store's idProperty. This is assigned on line #75 with a call to store.getIdentity(item) (which does include the item), so the getIdentity(object) shouldn't need to go back to the data store to get the identity.

Note: See TracTickets for help on using tickets.