From a12915fece1008e3b2855f59ef82780da2516d99 Mon Sep 17 00:00:00 2001 From: teo_sarca Date: Tue, 14 Apr 2009 08:23:52 +0000 Subject: [PATCH] FR [ 2694043 ] Query. first/firstOnly usage best practice https://sourceforge.net/tracker/index.php?func=detail&aid=2694043&group_id=176962&atid=879335 --- base/src/org/compiere/model/MRefList.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/base/src/org/compiere/model/MRefList.java b/base/src/org/compiere/model/MRefList.java index c0835d6189..d7e9f0e9bf 100644 --- a/base/src/org/compiere/model/MRefList.java +++ b/base/src/org/compiere/model/MRefList.java @@ -35,11 +35,16 @@ import org.compiere.util.ValueNamePair; * @author Jorg Janke * @version $Id: MRefList.java,v 1.3 2006/07/30 00:58:18 jjanke Exp $ * - * @author Teo Sarca, SC ARHIPAC SERVICE SRL - BF [ 1748449 ] + * @author Teo Sarca, www.arhipac.ro + *
  • BF [ 1748449 ] Info Account - Posting Type is not translated + *
  • FR [ 2694043 ] Query. first/firstOnly usage best practice */ public class MRefList extends X_AD_Ref_List { - private static final long serialVersionUID = 1L; + /** + * + */ + private static final long serialVersionUID = -6948532574960232289L; /** @@ -54,7 +59,7 @@ public class MRefList extends X_AD_Ref_List { return new Query(ctx, Table_Name, "AD_Reference_ID=? AND Value=?", trxName) .setParameters(new Object[]{AD_Reference_ID, Value}) - .first(); + .firstOnly(); } // get /**