Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-6213 in a recent build.
  1. #1
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    2,871
    Vote Rating
    154
    mankz is a splendid one to behold mankz is a splendid one to behold mankz is a splendid one to behold mankz is a splendid one to behold mankz is a splendid one to behold mankz is a splendid one to behold mankz is a splendid one to behold

      3  

    Default [4.1.0] 'id' field leak

    Code:
    Ext.define('foo', {
       extend : 'Ext.data.Model',
       fields : ['bar']
    });
    
    foo.prototype.fields.length; ==> 2
    Seems the 'id' field leaks into all subclassed models (breaks deserialization in ASP.NET for example).

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,316
    Vote Rating
    486
    scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute

      0  

    Default

    Thank you for the report.

    Regards,
    Scott.

  3. #3
    Sencha User Misiu's Avatar
    Join Date
    Jun 2012
    Location
    Poland
    Posts
    258
    Vote Rating
    73
    Misiu is just really nice Misiu is just really nice Misiu is just really nice Misiu is just really nice

      0  

    Default

    Any updates on this one? I and probably most of developers would like this fixed.
    id field should be default, but using some property we should be allow to overwrite this.

    Something like:
    Code:
    Ext.define('foo', {
       extend : 'Ext.data.Model',    
       idProperty : 'Id',//this is what we need!
       fields : [{name : 'Id', type : 'string'},//here I would like to store user guid
                 {name : 'Name', type : 'string'},
                 {name : 'Department', type : 'string'}] 
      });
    It isn't so hard to fix I guess

  4. #4
    Sencha User
    Join Date
    Jul 2012
    Posts
    2
    Vote Rating
    0
    keiths is on a distinguished road

      0  

    Default

    Any update on this? It is causing major problems for us.

  5. #5
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,316
    Vote Rating
    486
    scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute

      0  

    Default

    This is currently slated for the 4.2 release.

    Scott.

  6. #6
    Sencha User
    Join Date
    Jul 2012
    Posts
    2
    Vote Rating
    0
    keiths is on a distinguished road

      0  

    Default

    What is the estimated release date for 4.2?

  7. #7
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,316
    Vote Rating
    486
    scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute

      0  

    Default

    In the near future

    There is no public release date at this time.

    Scott.

  8. #8
    Sencha User Misiu's Avatar
    Join Date
    Jun 2012
    Location
    Poland
    Posts
    258
    Vote Rating
    73
    Misiu is just really nice Misiu is just really nice Misiu is just really nice Misiu is just really nice

      0  

    Default

    I know that 4.2 beta was released just couple of hours ago, but is this tiny bug fixed in this release?

  9. #9
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    2,871
    Vote Rating
    154
    mankz is a splendid one to behold mankz is a splendid one to behold mankz is a splendid one to behold mankz is a splendid one to behold mankz is a splendid one to behold mankz is a splendid one to behold mankz is a splendid one to behold

      0  

    Default

    If you use 'idProperty', the bug is not reproducible.

  10. #10
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,568
    Vote Rating
    55
    Animal will become famous soon enough Animal will become famous soon enough

      1  

    Default

    It's not really a "leak"

    It creates an id field for you based upon the default idProperty in Models which is "id"

    A Model must have some identifier.

    But if you really do not want that (eg an abstract base Model class), then you can

    Code:
    Ext.define('foo', {
       idProperty: null,  // No identifying field in this Model
       extend : 'Ext.data.Model',
       fields : ['bar']
    });