Browse Source

Adhere to test type #3 requirement 6
- It is not acceptable to retrieve all required rows using a
SELECT ... WHERE id IN (...) clause.

Lari Hotari 11 years ago
parent
commit
fbde981460

+ 4 - 1
grails/hello/grails-app/controllers/hello/HelloController.groovy

@@ -58,7 +58,10 @@ class HelloController {
                 world.randomNumber = random.nextInt(10000) + 1
                 world.randomNumber = random.nextInt(10000) + 1
             }
             }
         } else {
         } else {
-            worlds = World.getAll(worldIds as Serializable[])
+            worlds = new ArrayList<World>(queries)
+            for (Integer id : worldIds) {
+                worlds.add(World.read(id))
+            }
         }
         }
         return worlds
         return worlds
     }
     }