From 19d5a467f64ef9c6fe735e8e46839358323f60c1 Mon Sep 17 00:00:00 2001 From: "Redhuan D. Oon" Date: Wed, 19 Nov 2008 01:58:08 +0000 Subject: [PATCH] Discovered this rs.next logic error while doing Query exercise at experimental. Not sure if this is a reported bug. So i am changing it from IF to WHILE as it is clearly asking for an array and not a single record. --- base/src/org/compiere/model/MStatus.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/src/org/compiere/model/MStatus.java b/base/src/org/compiere/model/MStatus.java index 319897d231..6ecd1ba74d 100644 --- a/base/src/org/compiere/model/MStatus.java +++ b/base/src/org/compiere/model/MStatus.java @@ -115,7 +115,7 @@ public class MStatus extends X_R_Status pstmt = DB.prepareStatement (sql, null); pstmt.setInt(1, AD_Client_ID); ResultSet rs = pstmt.executeQuery (); - if (rs.next ()) + while (rs.next ()) list.add(new MStatus (ctx, rs, null)); rs.close (); pstmt.close ();