Results 1 to 4 of 4

Thread: [2.0.1] 'id' field present in subclassed model

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha Premium User mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    3,042
    Vote Rating
    182
      0  

    Default [2.0.1] 'id' field present in subclassed model

    Code:
     Ext.define('foo', {
            extend : 'Ext.data.Model',
            config : {
                fields : [
                    'bar'
                ]
            }
        })
        console.log(foo.prototype.fields.length);  // =2
    Expect code above to not include any 'id' field.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,413
    Vote Rating
    1269
      0  

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    11
      0  

    Default

    Actually there needs to be an id field on every Model. If you don't want it to be id, set the idProperty and create another field that acts as an id field.

    Marking this as wontfix in the meantime.

  4. #4
    Sencha Premium User mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    3,042
    Vote Rating
    182
      0  

    Default

    Though why should it behave differently in Ext vs Touch?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •