From 1dc923273d052c52f84eff3387e69321a09b367f Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Wed, 7 Aug 2013 18:39:40 +0800 Subject: [PATCH] IDEMPIERE-304 Remove PREFERENCETYPE_AD_Reference_ID in generated X_ class. Only generate for official id. --- .../src/org/adempiere/util/ModelClassGenerator.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/org.adempiere.base/src/org/adempiere/util/ModelClassGenerator.java b/org.adempiere.base/src/org/adempiere/util/ModelClassGenerator.java index 55503b6d16..7d28198d13 100644 --- a/org.adempiere.base/src/org/adempiere/util/ModelClassGenerator.java +++ b/org.adempiere.base/src/org/adempiere/util/ModelClassGenerator.java @@ -37,6 +37,7 @@ import java.util.logging.Level; import org.adempiere.exceptions.DBException; import org.compiere.Adempiere; +import org.compiere.model.MTable; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.DisplayType; @@ -601,9 +602,12 @@ public class ModelClassGenerator String columnName) { StringBuilder retValue = new StringBuilder(); - retValue.append("\n\t/** ").append(columnName).append(" AD_Reference_ID=").append(AD_Reference_ID) .append(" */") - .append("\n\tpublic static final int ").append(columnName.toUpperCase()) - .append("_AD_Reference_ID=").append(AD_Reference_ID).append(";"); + if (AD_Reference_ID <= MTable.MAX_OFFICIAL_ID) + { + retValue.append("\n\t/** ").append(columnName).append(" AD_Reference_ID=").append(AD_Reference_ID) .append(" */") + .append("\n\tpublic static final int ").append(columnName.toUpperCase()) + .append("_AD_Reference_ID=").append(AD_Reference_ID).append(";"); + } // boolean found = false; StringBuilder values = new StringBuilder("Reference_ID=")