[Pkg-javascript-commits] [dojo] 105/149: fixes #15156, dojo/store/DataStore was not setting implicit idProperty
David Prévot
taffit at moszumanska.debian.org
Sat Feb 27 03:13:53 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository dojo.
commit 344e26bec45b9158036c1d90b12910c537a5b3c7
Author: dylans <dylan at dojotoolkit.org>
Date: Tue Dec 22 13:00:11 2015 -0700
fixes #15156, dojo/store/DataStore was not setting implicit idProperty
---
store/DataStore.js | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/store/DataStore.js b/store/DataStore.js
index 986ef6f..e85445d 100644
--- a/store/DataStore.js
+++ b/store/DataStore.js
@@ -23,16 +23,16 @@ return declare("dojo.store.DataStore", base, {
// This provides any configuration information that will be mixed into the store,
// including a reference to the Dojo data store under the property "store".
lang.mixin(this, options);
- if(!"idProperty" in options){
- var idAttribute;
+ if(!("idProperty" in options)){
+ var idAttribute;
try{
- idAttribute = this.store.getIdentityAttributes();
- }catch(e){
- // some store are not requiring an item instance to give us the ID attributes
- // but some other do and throw errors in that case.
- }
- // if no idAttribute we have implicit id
- this.idProperty = (!idAttribute || !idAttributes[0]) || this.idProperty;
+ idAttribute = this.store.getIdentityAttributes();
+ }catch(e){
+ // some store are not requiring an item instance to give us the ID attributes
+ // but some other do and throw errors in that case.
+ }
+ // if no idAttribute we have implicit id
+ this.idProperty = (lang.isArray(idAttribute) ? idAttribute[0] : idAttribute) || this.idProperty;
}
var features = this.store.getFeatures();
// check the feature set and null out any methods that shouldn't be available
@@ -55,7 +55,7 @@ return declare("dojo.store.DataStore", base, {
// queryEngine: Function
// Defines the query engine to use for querying the data store
queryEngine: SimpleQueryEngine,
-
+
_objectConverter: function(callback){
var store = this.store;
var idProperty = this.idProperty;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git
More information about the Pkg-javascript-commits
mailing list