Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User aflx's Avatar
    Join Date
    Jun 2011
    Location
    Berlin, Germany
    Posts
    64
    Vote Rating
    0
    aflx is on a distinguished road

      0  

    Default [B1] Model idField type is set to auto

    [B1] Model idField type is set to auto


    Hi,

    I found out, that the type of the idField is always auto because of this in the Model.js:

    Code:
    idField = fieldsCollection.get(idProperty);
    if (!idField) {
      fieldsCollection.add(new Ext.data.Field(idProperty));
    } else {
      idField.setType('auto');
    }
    So if I want to use the id as int for my SqliteProxy with fieldOptions PRIMARY KEY AUTOINCREMENT this will not work!

    I think, you are doing this because of the different identifier (squential, uid, default...). But maybe you can check there first, which identifier is used before the type gets overridden with auto?

    Alex

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,731
    Vote Rating
    754
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I would agree. This was done intentional but I think a check should be done.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    9
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


    Would it be possible to convert the id value using parseInt inside the SqlLite proxy?

    Also, the auto field type should still allow you to use actual integers. Why would the sql lite database not work with field type auto?

  4. #4
    Sencha User aflx's Avatar
    Join Date
    Jun 2011
    Location
    Berlin, Germany
    Posts
    64
    Vote Rating
    0
    aflx is on a distinguished road

      0  

    Default


    At least I have to know which type I have to use for my table rows, when I am creating the SQL CREATE statement.

    So I would suggest, that auto is set only when no other field type is specified in the model?

  5. #5
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    9
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


    I'm sorry this was marked fixed. That was unintentional.

    The problem is that the automatically generated id's are strings like 'ext-record-1'. For consistency, this id is just like any other id until it is changed by the server or client side, and thus needs the id field to be type auto.

    Maybe I can add a configuration on the identifier that indicates the type the id's it produces are. This way you could make a purely sequential integer identifier (Ext.data.identifier.Sequential) which would keep the field as type 'int'.

    We are also still discussing internally how we can keep the identifier's seed in sync with the local storage database.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar