Opened 11 years ago
Closed 10 years ago
#13418 closed defect (wontfix)
dojo.data.api.Identity.getIdentityAttributes requires a dojo.data item as first argument, but not passed in dojo.store.DataStore
Reported by: | William Riley | Owned by: | Kris Zyp |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | Data | Version: | 1.7.0b1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
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 dojox.data, but if we look at line 135 of dojo/store/DataStore.js:
return object[this.idProperty || this.store.getIdentityAttributes()[0]];
the item argument isn't being passed, thus using a dojox.data.XmlStore? with a dojo.store.DataStore? 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
Owner: | changed from Jared Jurkiewicz to Kris Zyp |
---|
comment:2 Changed 10 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
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.