[Pkg-javascript-commits] [dojo] 17/29: fixes #15156, dojo/store/DataStore was not setting implicit idProperty
David Prévot
taffit at moszumanska.debian.org
Thu Mar 24 04:28:35 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag 1.8.11
in repository dojo.
commit 5ce9e1f9530a40217302bf2b67a632926b679531
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
(cherry picked from commit 344e26bec45b9158036c1d90b12910c537a5b3c7)
---
store/DataStore.js | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/store/DataStore.js b/store/DataStore.js
index 3381eff..c55952a 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