From e6785ab960aed2fd74cbffd7c11ea0a0c605364d Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 25 Mar 2011 20:11:11 -0500 Subject: [PATCH] =?UTF-8?q?Avoid=20unnecessary=20DB=20access=20Steps=20to?= =?UTF-8?q?=20reproduce=20in=20zkwebui=20in=20log=20level=20Info:=20-=20Op?= =?UTF-8?q?en=20Sales=20Order=20window=20A=20warning=20is=20written=20in?= =?UTF-8?q?=20console:=20DB.getSQLValueStringEx:=20No=20Value=20SELECT=20C?= =?UTF-8?q?olumnName=20FROM=20AD=5FColumn=20WHERE=20AD=5FColumn=5FID=3D=3F?= --- org.adempiere.base/src/org/compiere/model/GridTab.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/model/GridTab.java b/org.adempiere.base/src/org/compiere/model/GridTab.java index 2f21d1fedf..ed75490b89 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTab.java +++ b/org.adempiere.base/src/org/compiere/model/GridTab.java @@ -1267,7 +1267,8 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable { // set parent column name String sql = "SELECT ColumnName FROM AD_Column WHERE AD_Column_ID=?"; - m_parentColumnName = DB.getSQLValueString(null, sql, m_vo.Parent_Column_ID ); + if (m_vo.Parent_Column_ID > 0) + m_parentColumnName = DB.getSQLValueString(null, sql, m_vo.Parent_Column_ID ); if ( m_parentColumnName == null ) m_parentColumnName = "";