Browse Source

fixed updates benchmark: modify mapped property 'randomNumber', otherwise
the changes are never persisted in db (ie. no update statements are executed, because
the model isn't marked as dirty).

Robert Gaggl 12 years ago
parent
commit
e3b655e9fd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ringojs-convenient/app/views.js

+ 1 - 1
ringojs-convenient/app/views.js

@@ -61,7 +61,7 @@ app.get('/updates/:queries?', function(request, queries) {
    for (var i = 0; i < queries; i++) {
       randId = ((Math.random() * 10000) | 0) + 1;
       world = models.store.query('select World.* from World where World.id = :id', {id: randId})[0];
-      world.randomId = ((Math.random() * 10000) | 0) + 1;
+      world.randomNumber = ((Math.random() * 10000) | 0) + 1;
       world.save();
       worlds.push(world.toJSON());
    }