From 691b689ee71328d6fe5bbb6ac838516132d6c727 Mon Sep 17 00:00:00 2001 From: vpj-cd Date: Sun, 7 Mar 2010 18:06:05 +0000 Subject: [PATCH] Remove SQL code and Replace for Query Red1 please review your code before to commitment, or commitment after the units test, some implementor are using trunk in production kind regards Victor Perez www.e-evolution.com Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2214883 --- base/src/org/compiere/model/MBPBankAccount.java | 10 ++++++---- base/src/org/compiere/model/MTable.java | 11 ++++++----- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/base/src/org/compiere/model/MBPBankAccount.java b/base/src/org/compiere/model/MBPBankAccount.java index b50ea4cd8c..d6a23f228d 100644 --- a/base/src/org/compiere/model/MBPBankAccount.java +++ b/base/src/org/compiere/model/MBPBankAccount.java @@ -31,10 +31,12 @@ import org.compiere.util.CLogger; public class MBPBankAccount extends X_C_BP_BankAccount { + + /** - * - */ - private static final long serialVersionUID = 2580706419593695062L; + * + */ + private static final long serialVersionUID = 2580706419593695062L; /** * Get Accounst Of BPartner @@ -45,7 +47,7 @@ public class MBPBankAccount extends X_C_BP_BankAccount public static MBPBankAccount[] getOfBPartner (Properties ctx, int C_BPartner_ID) { final String whereClause = MBPBankAccount.COLUMNNAME_C_BPartner_ID+"=?"; - Listlist = new Query(ctx,MBPBankAccount.COLUMNNAME_C_BPartner_ID,whereClause,null) + Listlist = new Query(ctx,MBPBankAccount.Table_Name,whereClause,null) .setParameters(C_BPartner_ID) .setOnlyActiveRecords(true) .list(); diff --git a/base/src/org/compiere/model/MTable.java b/base/src/org/compiere/model/MTable.java index 20286490b7..48e05832b3 100644 --- a/base/src/org/compiere/model/MTable.java +++ b/base/src/org/compiere/model/MTable.java @@ -50,10 +50,11 @@ import org.compiere.util.Util; */ public class MTable extends X_AD_Table { - /** - * - */ - private static final long serialVersionUID = -2367316254623142732L; + + /** + * + */ + private static final long serialVersionUID = -2367316254623142732L; /** * Get Table from Cache @@ -97,7 +98,7 @@ public class MTable extends X_AD_Table } } // - final String whereClause = I_AD_Table.COLUMNNAME_AD_Table_ID.toUpperCase()+"=?"; + final String whereClause = "UPPER("+I_AD_Table.COLUMNNAME_TableName+")=?"; MTable retValue = new Query(ctx,I_AD_Table.Table_Name,whereClause,null) .setParameters(tableName.toUpperCase()) .first();