X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..HEAD:/docs/source/HasManyAssociation.html diff --git a/docs/source/HasManyAssociation.html b/docs/source/HasManyAssociation.html index 205dac04..f1bc427e 100644 --- a/docs/source/HasManyAssociation.html +++ b/docs/source/HasManyAssociation.html @@ -1,4 +1,21 @@ -Sencha Documentation Project
/**
+
+
+
+  
+  The source code
+  
+  
+  
+  
+
+
+  
/**
  * @author Ed Spencer
  * @class Ext.data.HasManyAssociation
  * @extends Ext.data.Association
@@ -35,7 +52,7 @@ Ext.define('User', {
  * 
 <pre><code>
 //first, we load up a User with id of 1
-var user = Ext.ModelManager.create({id: 1, name: 'Ed'}, 'User');
+var user = Ext.create('User', {id: 1, name: 'Ed'});
 
 //the user.products function was created automatically by the association and returns a {@link Ext.data.Store Store}
 //the created store is automatically scoped to the set of Products for the User with id of 1
@@ -91,7 +108,7 @@ var store = new Search({query: 'Sencha Touch'}).tweets();
  * equivalent to this:</p>
  * 
 <pre><code>
-var store = new Ext.data.Store({
+var store = Ext.create('Ext.data.Store', {
     model: 'Tweet',
     filters: [
         {
@@ -108,7 +125,7 @@ Ext.define('Ext.data.HasManyAssociation', {
 
     alias: 'association.hasmany',
 
-    /**
+    /**
      * @cfg {String} foreignKey The name of the foreign key on the associated model that links it to the owner
      * model. Defaults to the lowercased name of the owner model plus "_id", e.g. an association with a where a
      * model called Group hasMany Users would create 'group_id' as the foreign key. When the remote store is loaded,
@@ -129,7 +146,7 @@ Ext.define('User', {
      * </code></pre>
      */
     
-    /**
+    /**
      * @cfg {String} name The name of the function to create on the owner model to retrieve the child store.
      * If not specified, the pluralized name of the child model is used.
      * <pre><code>
@@ -153,23 +170,23 @@ console.log(group.getUserList());
      * </code></pre>
      */
     
-    /**
+    /**
      * @cfg {Object} storeConfig Optional configuration object that will be passed to the generated Store. Defaults to 
      * undefined.
      */
     
-    /**
+    /**
      * @cfg {String} filterProperty Optionally overrides the default filter that is set up on the associated Store. If
      * this is not set, a filter is automatically created which filters the association based on the configured 
      * {@link #foreignKey}. See intro docs for more details. Defaults to undefined
      */
     
-    /**
+    /**
      * @cfg {Boolean} autoLoad True to automatically load the related store from a remote source when instantiated.
      * Defaults to <tt>false</tt>.
      */
     
-    /**
+    /**
      * @cfg {String} type The type configuration can be used when creating associations using a configuration object.
      * Use 'hasMany' to create a HasManyAssocation
      * <pre><code>
@@ -200,7 +217,7 @@ associations: [{
         ownerProto[name] = me.createStore();
     },
     
-    /**
+    /**
      * @private
      * Creates a function that returns an Ext.data.Store which is configured to load a set of data filtered
      * by the owner model's primary key - e.g. in a hasMany association where Group hasMany Users, this function
@@ -256,7 +273,7 @@ associations: [{
         };
     },
     
-    /**
+    /**
      * Read associated data
      * @private
      * @param {Ext.data.Model} record The record we're writing to
@@ -282,4 +299,6 @@ associations: [{
             });
         }
     }
-});
\ No newline at end of file +});
+ +