-
16 Oct 2012 5:42 PM #1
[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 '; } }
-
17 Oct 2012 1:49 AM #2
I have problems with line 268 !
ln = params.filters.length;
When there are no filters setup in the proxy config...Greetings -Ralf Kraus-
-
17 Oct 2012 5:32 AM #3Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
Thanks for the report! I have opened a bug in our bug tracker.
-
17 Oct 2012 7:23 AM #4
-
17 Oct 2012 7:44 AM #5Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Haarlem, Netherlands
- Posts
- 1,235
- Vote Rating
- 5
I've fixed the issues with filters.
@wprater Can you tell me what particular issues you are having with inserts?
-
17 Oct 2012 7:51 AM #6
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.
-
18 Oct 2012 4:43 AM #7
@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 KrausGreetings -Ralf Kraus-
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-3583
in
Sprint 26 (2.1.0-rc2).


Reply With Quote


