dojo.data.api.Identity.getIdentityAttributes
dojo.require("dojo.data.api.Identity");
defined in dojo/data/api/Identity.js
Returns an array of attribute names that are used to generate the identity. For most stores, this is a single attribute, but for some complex stores such as RDB backed stores that use compound (multi-attribute) identifiers it can be more than one. If the identity is not composed of attributes on the item, it will return null. This function is intended to identify the attributes that comprise the identity so that so that during a render of all attributes, the UI can hide the the identity information if it chooses.
Usage
function (item) (view source)
parameter | type | description |
---|---|---|
item | The item from the store from which to obtain the array of public attributes that compose the identifier, if any. |
Examples
Example 1
var itemId = store.getIdentity(kermit);
var identifiers = store.getIdentityAttributes(itemId);
assert(typeof identifiers === "array" || identifiers === null);