Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 81895 invoked from network); 26 Oct 2009 10:57:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Oct 2009 10:57:24 -0000 Received: (qmail 9189 invoked by uid 500); 26 Oct 2009 10:57:22 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 9111 invoked by uid 500); 26 Oct 2009 10:57:22 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 9101 invoked by uid 99); 26 Oct 2009 10:57:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Oct 2009 10:57:22 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Oct 2009 10:57:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 791FD234C052 for ; Mon, 26 Oct 2009 03:56:59 -0700 (PDT) Message-ID: <417475737.1256554619494.JavaMail.jira@brutus> Date: Mon, 26 Oct 2009 10:56:59 +0000 (UTC) From: =?utf-8?Q?Julien_Aym=C3=A9_=28JIRA=29?= To: issues@commons.apache.org Subject: [jira] Commented: (DBUTILS-57) BeanProcessor not able to map an alias column from a HSQLDB query to the any bean properties In-Reply-To: <991131300.1249981755203.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DBUTILS-57?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1276= 9986#action_12769986 ]=20 Julien Aym=C3=A9 commented on DBUTILS-57: ------------------------------------ This request is coherent to what has been done into the last BeanUtils rele= ase: see issue BEANUTILS-344. > BeanProcessor not able to map an alias column from a HSQLDB query to the = any bean properties > -------------------------------------------------------------------------= ------------------- > > Key: DBUTILS-57 > URL: https://issues.apache.org/jira/browse/DBUTILS-57 > Project: Commons DbUtils > Issue Type: Bug > Environment: hsqldb-1.9.0-rc4 memory mode > DBUtils 1.2 > Reporter: Wynand > > Using a query with an alias, hsqldb engine doesn't populate the column na= me metadata only the column label metadata. > In such a case the column isn't mapped. > To resolve this, the column label should be used in case the column name = is not available. > Here is a snippet from org.apache.commons.dbutils.BeanProcessor.mapColumn= sToProperties line 393 :=20 > ... > for (int col =3D 1; col <=3D cols; col++) { =20 > String columnName =3D rsmd.getColumnName(col); > // columnName is empty, revert to column label > if (columnName.length() =3D=3D 0) { > columnName =3D rsmd.getColumnLabel(col); > } =20 > ... --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.