Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jcoleman/1004654 to your computer and use it in GitHub Desktop.
Save jcoleman/1004654 to your computer and use it in GitHub Desktop.
From c1358ec83a89819416f0a68a674cc06c325e8e81 Mon Sep 17 00:00:00 2001
From: James Coleman <james.coleman@m33integrated.com>
Date: Thu, 2 Jun 2011 10:22:37 -0400
Subject: [PATCH] Faster retrieval of bills of lading on consolidation.
---
.../tms/controllers/ShipmentController.groovy | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/grails-app/controllers/com/m33integrated/tms/controllers/ShipmentController.groovy b/grails-app/controllers/com/m33integrated/tms/controllers/ShipmentController.groovy
index 7daad9b..719008d 100644
--- a/grails-app/controllers/com/m33integrated/tms/controllers/ShipmentController.groovy
+++ b/grails-app/controllers/com/m33integrated/tms/controllers/ShipmentController.groovy
@@ -123,8 +123,8 @@ class ShipmentController extends ResourceController {
if (params.billOfLadingIds != null) {
if (params.billOfLadingIds.class.isArray()) {
log.debug "ITS AN ARRAY"
- billsOfLading = params.billOfLadingIds.collect { billId ->
- BillOfLading[billId]
+ billsOfLading = BillOfLading.where {
+ id in: params.billOfLadingIds.collect { it as Long }
}
} else {
billsOfLading = [BillOfLading[params.billOfLadingIds]]
--
1.7.4.1+GitX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment