Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 19543 invoked from network); 11 Feb 2009 22:42:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Feb 2009 22:42:27 -0000 Received: (qmail 46144 invoked by uid 500); 11 Feb 2009 22:42:23 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 46062 invoked by uid 500); 11 Feb 2009 22:42:23 -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 45980 invoked by uid 99); 11 Feb 2009 22:42:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Feb 2009 14:42:23 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED 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; Wed, 11 Feb 2009 22:42:21 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 034C6234C4BF for ; Wed, 11 Feb 2009 14:42:00 -0800 (PST) Message-ID: <1849733936.1234392120010.JavaMail.jira@brutus> Date: Wed, 11 Feb 2009 14:42:00 -0800 (PST) From: "Dan Fabulich (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (DBUTILS-34) BasicRowProcessor loses any information on database field case MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DBUTILS-34?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672816#action_12672816 ] Dan Fabulich commented on DBUTILS-34: ------------------------------------- Done in bugfixing branch revision 743292. > BasicRowProcessor loses any information on database field case > -------------------------------------------------------------- > > Key: DBUTILS-34 > URL: https://issues.apache.org/jira/browse/DBUTILS-34 > Project: Commons DbUtils > Issue Type: Improvement > Affects Versions: 1.0 > Reporter: Fabio Insaccanebbia > Priority: Minor > Attachments: BasicRowProcessor.java, BasicRowProcessor.patch > > > In the BasicRowProcessor class there is a comment about the toMap method: > " This implementation returns a Map with case insensitive column names as keys. Calls to map.get("COL") and map.get("col") return the same value" > So the "contract" of this method just says that the "get" method is case insensitive. The current implementation obtains this result by putting all the keys in lowercase. This way we simply "lose" every information about the case of the fields. If you call the "keys" iterator, you don't have anymore the keys you inserted, but the "lowercase" version. > I find it not completely correct: I would expect the keys to be exactly the ones I set on the database, also if I can get the value in a case insensitive way. > I still have to find the idea for a pathc, but I'd like to know if you find my reasoning correct. > I consider the current behaviour a problem, since I had to map the database fields to a bean and the "case" made it impossible, even if I had set my database to return mixed case fieldnames. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.