From f18d221b411a7fd9f81a6a6d0f44557707588370 Mon Sep 17 00:00:00 2001 From: PeterTakacs300 <93127072+PeterTakacs300@users.noreply.github.com> Date: Tue, 12 Apr 2022 09:42:35 +0200 Subject: [PATCH] IDEMPIERE-5266 - AD_Column Caching changes (#1290) --- .../src/org/adempiere/util/AbstractDocumentSearch.java | 2 +- org.adempiere.base/src/org/compiere/model/MLookupFactory.java | 2 +- .../src/org/adempiere/webui/apps/DocumentSearchController.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/org.adempiere.base/src/org/adempiere/util/AbstractDocumentSearch.java b/org.adempiere.base/src/org/adempiere/util/AbstractDocumentSearch.java index 8a8e61fa3d..d424603724 100644 --- a/org.adempiere.base/src/org/adempiere/util/AbstractDocumentSearch.java +++ b/org.adempiere.base/src/org/adempiere/util/AbstractDocumentSearch.java @@ -146,7 +146,7 @@ public abstract class AbstractDocumentSearch { MTable table = new MTable(Env.getCtx(), msd.getAD_Table_ID(), null); // SearchDefinition with a given table and column if (msd.getSearchType().equals(MSearchDefinition.SEARCHTYPE_TABLE)) { - MColumn column = new MColumn(Env.getCtx(), msd.getAD_Column_ID(), null); + MColumn column = MColumn.get(Env.getCtx(), msd.getAD_Column_ID()); sqlSO = new StringBuilder("SELECT ").append(table.getTableName()).append("_ID FROM ").append(table.getTableName()) .append(" "); // search for an Integer diff --git a/org.adempiere.base/src/org/compiere/model/MLookupFactory.java b/org.adempiere.base/src/org/compiere/model/MLookupFactory.java index 7ca8dcf8ca..c4ce392e69 100644 --- a/org.adempiere.base/src/org/compiere/model/MLookupFactory.java +++ b/org.adempiere.base/src/org/compiere/model/MLookupFactory.java @@ -684,7 +684,7 @@ public class MLookupFactory embedSQL.append(TableNameAlias).append(".Value||'").append(separator).append("'||"); } - MColumn columnDisplay = new MColumn(Env.getCtx(), columnDisplay_ID, null); + MColumn columnDisplay = MColumn.get(Env.getCtx(), columnDisplay_ID); if (columnDisplay.isVirtualUIColumn() || columnDisplay.isVirtualSearchColumn()) { s_log.warning("Virtual UI Column must not be used as display"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/DocumentSearchController.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/DocumentSearchController.java index 479db74257..c9d2a16057 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/DocumentSearchController.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/DocumentSearchController.java @@ -135,7 +135,7 @@ public class DocumentSearchController implements EventListener{ List params = new ArrayList(); // SearchDefinition with a given table and column if (msd.getSearchType().equals(MSearchDefinition.SEARCHTYPE_TABLE)) { - MColumn column = new MColumn(Env.getCtx(), msd.getAD_Column_ID(), null); + MColumn column = MColumn.get(Env.getCtx(), msd.getAD_Column_ID()); sql = new StringBuilder("SELECT ").append(table.getTableName()).append("_ID, ") .append(column.getColumnName()); sql.append(" FROM ")