Skip to content
Browse files

bug fix

  • Loading branch information...
1 parent 5f0fb1e commit 71bb1252cb22f3a83a3bf8bdfeb0eca20ca240c2 @shepsii shepsii committed May 23, 2012
Showing with 4 additions and 5 deletions.
  1. +4 −5 sqlite/data/proxy/SqliteStorage.js
View
9 sqlite/data/proxy/SqliteStorage.js
@@ -12,7 +12,6 @@
Ext.define('Sqlite.data.proxy.SqliteStorage', {
extend: 'Ext.data.proxy.Client',
alias: 'proxy.sqlitestorage',
-
config: {
reader: null,
writer: null,
@@ -479,9 +478,6 @@ Ext.define('Sqlite.data.proxy.SqliteStorage', {
applyData: function(data, operation, callback, scope) {
var me = this;
-
- operation.setSuccessful();
- operation.setCompleted();
operation.setResultSet(Ext.create('Ext.data.ResultSet', {
records: data,
@@ -492,6 +488,9 @@ Ext.define('Sqlite.data.proxy.SqliteStorage', {
// finish with callback
operation.setRecords(data);
+ operation.setSuccessful();
+ operation.setCompleted();
+
if (typeof callback == "function") {
callback.call(scope || me, operation);
}
@@ -581,7 +580,7 @@ Ext.define('Sqlite.data.proxy.SqliteStorage', {
onSuccess = function(tx, rs) {
//add new record if id doesn't exist
if (rs.rowsAffected == 0) {
- me.getInsertRecordFunc(record, tablename)();
+ me.getInsertRecordFunc(record, tablename)(tx);
}
},

0 comments on commit 71bb125

Please sign in to comment.
Something went wrong with that request. Please try again.