Quellcode durchsuchen

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 vor 12 Jahren
Ursprung
Commit
e3b655e9fd
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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++) {
    for (var i = 0; i < queries; i++) {
       randId = ((Math.random() * 10000) | 0) + 1;
       randId = ((Math.random() * 10000) | 0) + 1;
       world = models.store.query('select World.* from World where World.id = :id', {id: randId})[0];
       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();
       world.save();
       worlds.push(world.toJSON());
       worlds.push(world.toJSON());
    }
    }