From fbde98146069e4bc19a3f37ff0512c9b2f8dbe87 Mon Sep 17 00:00:00 2001 From: Lari Hotari Date: Thu, 7 Nov 2013 21:52:18 +0200 Subject: [PATCH] Adhere to test type #3 requirement 6 - It is not acceptable to retrieve all required rows using a SELECT ... WHERE id IN (...) clause. --- .../grails-app/controllers/hello/HelloController.groovy | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/grails/hello/grails-app/controllers/hello/HelloController.groovy b/grails/hello/grails-app/controllers/hello/HelloController.groovy index 9c4748c3a83..d9efa408dbd 100644 --- a/grails/hello/grails-app/controllers/hello/HelloController.groovy +++ b/grails/hello/grails-app/controllers/hello/HelloController.groovy @@ -58,7 +58,10 @@ class HelloController { world.randomNumber = random.nextInt(10000) + 1 } } else { - worlds = World.getAll(worldIds as Serializable[]) + worlds = new ArrayList(queries) + for (Integer id : worldIds) { + worlds.add(World.read(id)) + } } return worlds }