From bca6ae9e1930f6330b685895fb5178aadee922f9 Mon Sep 17 00:00:00 2001 From: vpj-cd Date: Thu, 11 Sep 2008 04:22:13 +0000 Subject: [PATCH] NULLS LAST not supported in postgresql 8.2 or earlier http://sourceforge.net/tracker/?func=detail&atid=879332&aid=2104835&group_id=176962 --- base/src/org/eevolution/model/MPPProductPlanning.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/src/org/eevolution/model/MPPProductPlanning.java b/base/src/org/eevolution/model/MPPProductPlanning.java index 6a3c7dcb87..414b9adfe1 100644 --- a/base/src/org/eevolution/model/MPPProductPlanning.java +++ b/base/src/org/eevolution/model/MPPProductPlanning.java @@ -151,7 +151,7 @@ public class MPPProductPlanning extends X_PP_Product_Planning + " AND (S_Resource_ID IN (0,?) OR S_Resource_ID IS NULL)"; return new Query(ctx, Table_Name, whereClause, trxName) .setParameters(new Object[]{Env.getAD_Client_ID(ctx), M_Product_ID, AD_Org_ID, M_Warehouse_ID, S_Resource_ID}) - .setOrderBy("AD_Org_ID DESC NULLS LAST, M_Warehouse_ID DESC NULLS LAST, S_Resource_ID DESC NULLS LAST") + .setOrderBy("AD_Org_ID is null, AD_Org_ID DESC, M_Warehouse_ID is null,M_Warehouse_ID DESC , S_Resource_ID is null, S_Resource_ID DESC ") .first(); }