[dojo-contributors] dijit.Tree assumes datastore implements Identity API
Brian Douglas Skinner
skinner at dojotoolkit.org
Tue Aug 21 20:09:12 EDT 2007
>>> if you do some query like
>>> and then it returns a list of item without id's, you're stuck.
>>> I'm not sure if that would ever happen in real life though?
>> I see. Thanks for the explanation.
>> Even in that case, couldn't the datastore still assign unique
>> id's to the items if it really wanted to? The unique id could
>> be a compound key with two parts, like "xyz-267", where "xyz"
>> is a unique identifier for the query that was sent to the server,
>> and "267" is the index of the item in the result set returned
>> by the server?
> That's a bit too unique. Two separate queries might return the
> same item but with different id's.
Right, but in that case there's really not much we can do. If the
server doesn't provide any sort of unique id's for us, and if the result
sets of two different queries each include a "Jane Smith" record, then
there's no reliable way for us to know if the two "Jane Smith" results
both represent the same Jane Smith, or each represent a different Jane
Smith. The server isn't giving us enough info here, so we have to do
the best with what we've got.
More information about the dojo-contributors