Query. first/firstOnly usage best practice

https://sourceforge.net/tracker/?func=detail&atid=879335&aid=2694043&group_id=176962
This commit is contained in:
teo_sarca 2009-04-24 13:31:07 +00:00
parent d3aca98c26
commit 387a56bab4
1 changed files with 2 additions and 1 deletions

View File

@ -144,7 +144,8 @@ public class MBPartner extends X_C_BPartner
return null;
String whereClause = "Value=? AND AD_Client_ID=?";
MBPartner retValue = new Query(ctx,MBPartner.Table_Name,whereClause.toString(),null)
.setParameters(new Object[]{Value,Env.getAD_Client_ID(ctx)}).first();
.setParameters(new Object[]{Value,Env.getAD_Client_ID(ctx)})
.firstOnly();
return retValue;
} // get