Hybrid View

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-3583 in a recent build.
  1. #1
    Sencha User
    Join Date
    Mar 2010
    Location
    Seattle, WA
    Posts
    137
    Vote Rating
    1
    wprater is on a distinguished road

      0  

    Default [ST2.1 RC2] SQL Proxy accessing incorrect Filter property

    [ST2.1 RC2] SQL Proxy accessing incorrect Filter property


    You need to access the getter for the anyMatch filter config.

    Not sure if this is planned for 2.1 release, but it'd be nice to get this patch applied.

    Here is a patch

    Code:
    diff --git a/vendor/sencha/touch/src/data/proxy/SQL.js b/vendor/sencha/touch/src/data/proxy/SQL.js
    index 1df2d47..c6978bd 100644
    --- a/vendor/sencha/touch/src/data/proxy/SQL.js
    +++ b/vendor/sencha/touch/src/data/proxy/SQL.js
    @@ -272,7 +272,7 @@ Ext.define('Ext.data.proxy.SQL', {
                         property = filter.getProperty();
                         value = filter.getValue();
                         if (property !== null) {
    -                        sql += filterStatement + property + ' ' + (filter.anyMatch ? ('LIKE \'%' + value + '%\'') : ('= \'' + value + '\''));
    +                        sql += filterStatement + property + ' ' + (filter.getAnyMatch() ? ('LIKE \'%' + value + '%\'') : ('= \'' + value + '\''));
                             filterStatement = ' AND ';
                         }
                     }

  2. #2
    Sencha User rkraus's Avatar
    Join Date
    Dec 2011
    Location
    Bonn / Germany
    Posts
    68
    Vote Rating
    0
    rkraus is an unknown quantity at this point

      0  

    Default


    I have problems with line 268 !

    ln = params.filters.length;

    When there are no filters setup in the proxy config...
    Greetings -Ralf Kraus-

  3. #3
    Sencha User
    Join Date
    Mar 2010
    Location
    Seattle, WA
    Posts
    137
    Vote Rating
    1
    wprater is on a distinguished road

      0  

    Default


    Me too. I just pass empty arrays for now. And I've been using #load to setup new ones.

    However, Im having larger issues getting inserts to work, so I've ended up doing all the executeSql by hand.

    Quote Originally Posted by rkraus View Post
    I have problems with line 268 !

    ln = params.filters.length;

    When there are no filters setup in the proxy config...

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

      0  

    Default


    I've fixed the issues with filters.

    @wprater Can you tell me what particular issues you are having with inserts?

  5. #5
    Sencha User
    Join Date
    Mar 2010
    Location
    Seattle, WA
    Posts
    137
    Vote Rating
    1
    wprater is on a distinguished road

      0  

    Default


    Quote Originally Posted by TommyMaintz View Post
    I've fixed the issues with filters.

    @wprater Can you tell me what particular issues you are having with inserts?
    I haven't been able to dig into your callback chain, but it's stalling out Chrome when I #sync the store that's using the SQL proxy. I am, however, doing a very large set of inserts. I'll do another test today, but I was checking the raw sqlite database and it was not growing.

    This is just a one time setup/import and Im inserting ~80k records into the table.

    Inserting the records manually with executeSql takes a bit of time, but will succeed. After which new selects are fast, which is relieving.

  6. #6
    Sencha User rkraus's Avatar
    Join Date
    Dec 2011
    Location
    Bonn / Germany
    Posts
    68
    Vote Rating
    0
    rkraus is an unknown quantity at this point

      0  

    Default


    @Tommy

    When I try to save a datamodel with an ARRAY in it I ran into problem.
    After I load the record from WebSQL I am gettings objects instead of an ARRAY :-(

    Is this a bug or will I have to EnCode and DeCode this array in JSON (for example).

    Greets,

    Ralf Kraus
    Greetings -Ralf Kraus-

  7. #7
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,203
    Vote Rating
    856
    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


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