From 8cf9a70dfb9d429d31f3a9d593bb1b20451df0f2 Mon Sep 17 00:00:00 2001 From: vpj-cd Date: Sat, 24 Apr 2010 18:29:03 +0000 Subject: [PATCH] The current Persistence Engine Allow not get I_Table Validate that only the package org.compiere.model is use to dictionary entity type to some table that start with I_X_?, if entity type is not dictionary then the package of entity type is use. kind regards Victor Perez www.e-evolution.com Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2949927 --- base/src/org/compiere/model/MTable.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/base/src/org/compiere/model/MTable.java b/base/src/org/compiere/model/MTable.java index 8384cac715..be30492266 100644 --- a/base/src/org/compiere/model/MTable.java +++ b/base/src/org/compiere/model/MTable.java @@ -188,8 +188,11 @@ public class MTable extends X_AD_Table if (tableName == null || tableName.endsWith("_Trl")) return null; + MTable table = MTable.get(Env.getCtx(), tableName); + String entityType = table.getEntityType(); + // Import Tables (Name conflict) - if (tableName.startsWith("I_")) + if (tableName.startsWith("I_") && MEntityType.ENTITYTYPE_Dictionary.equals(entityType)) { Class clazz = getPOclass("org.compiere.model.X_" + tableName); if (clazz != null) @@ -227,8 +230,6 @@ public class MTable extends X_AD_Table } //begin [ 1784588 ] Use ModelPackage of EntityType to Find Model Class - vpj-cd - MTable table = MTable.get(Env.getCtx(), tableName); - String entityType = table.getEntityType(); if (!MEntityType.ENTITYTYPE_Dictionary.equals(entityType)) { for (int i = 0; i < entityTypes.length; i++)