Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 85402 invoked from network); 6 Aug 2008 15:18:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Aug 2008 15:18:39 -0000 Received: (qmail 44184 invoked by uid 500); 6 Aug 2008 15:18:35 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 44172 invoked by uid 500); 6 Aug 2008 15:18:35 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 44161 invoked by uid 99); 6 Aug 2008 15:18:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Aug 2008 08:18:35 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of clinton.begin@gmail.com designates 74.125.46.154 as permitted sender) Received: from [74.125.46.154] (HELO yw-out-1718.google.com) (74.125.46.154) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Aug 2008 15:17:38 +0000 Received: by yw-out-1718.google.com with SMTP id 5so2012263ywr.6 for ; Wed, 06 Aug 2008 08:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=yFVxwYmoTm6O7BXTf8QCIRTaQlT52HfSuuln+qMK+ig=; b=JFz45icPqt8lwNzRKTtGFxzRxCIBcWdYj1T5DJZvWbZsKEwBOmwvf8GcCPTyA3TrxX +E5dO7I6ksWBC1dhS0m0NMKP5hYsSnhlBHUwk1HgPSksNiwFKxIMat0wIXu9oa0ZmfRc EUvC4ANSFosQcvVVdqW93+9soNwHCkC/Vg2wE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=BkSfg559gjwLYzVY2bH2iVZCbq1XDnn7KjSmlBZdFB3KWAoMv+50WQyZyGoVFGiqTk brmiW2Cih+BvtL1VAJUCJToY0N+4dYwkfKG8oHoJ6CyTjHozp45IdSLK0MfBRz0EUc8s AUePQie+Nh5Y/Tz5ilQC3/CWk00EvsfOb71EA= Received: by 10.114.169.20 with SMTP id r20mr372025wae.198.1218035884373; Wed, 06 Aug 2008 08:18:04 -0700 (PDT) Received: by 10.114.135.10 with HTTP; Wed, 6 Aug 2008 08:18:04 -0700 (PDT) Message-ID: <16178eb10808060818g3c3b4ae7j7739baf3d55e6b07@mail.gmail.com> Date: Wed, 6 Aug 2008 09:18:04 -0600 From: "Clinton Begin" To: user-java@ibatis.apache.org Subject: Re: Changing the default column --> property name mapping In-Reply-To: <16178eb10808060817p2c09da4x8ec89cc7a3012644@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5499_32231440.1218035884397" References: <970ef52e0808060739u74810f5av139472dd7d6a0446@mail.gmail.com> <5f9068320808060811r1fe6486er6091fa95a7f564d6@mail.gmail.com> <16178eb10808060817p2c09da4x8ec89cc7a3012644@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_5499_32231440.1218035884397 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline PS: Make it configurable/pluggable and maybe we'll even include it. See the iBATIS 3 wiki page for proposed requirements. On Wed, Aug 6, 2008 at 9:17 AM, Clinton Begin wrote: > If you don't mind running a hacked version of the framework, you could hack > AutoResultMap.java. > > Clinton > > > On Wed, Aug 6, 2008 at 9:11 AM, Michael Schall wrote: > >> Lance - >> >> I'm pretty sure this is only a proposed feature for 3.0. Jason's example >> is the only way of mapping columns to properties that I'm aware of in 2.x. >> >> >> http://opensource.atlassian.com/confluence/oss/display/IBATIS/iBATIS+3.0+Whiteboard#iBATIS3.0Whiteboard-SomePossibleConfigurationOptions >> >> Mike >> >> >> On Wed, Aug 6, 2008 at 9:57 AM, Jason Kratz wrote: >> >>> Not sure I understand you. This is exactly how a resultMap works (and >>> core to iBATIS) >>> >>> >>> .... >>> >>> >>> >>> On Aug 6, 2008, at 9:39 AM, Lance Java wrote: >>> >>> I would like to change the default column --> property name mapping >>> functionality. >>> eg in my db, column names are of the form "column_name" whereas >>> properties are of the form "columnName" >>> >>> I have read through the documentation and there is no mention of >>> providing my own column --> property name mapper. >>> >>> I realise that I can use "select column_name AS columnName" but this does >>> not work for "select *" or stored procedures etc. >>> >>> >>> Cheers, >>> Lance. >>> >>> >>> >> > ------=_Part_5499_32231440.1218035884397 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
PS:  Make it configurable/pluggable and maybe we'll even include it.  See the iBATIS 3 wiki page for proposed requirements.

On Wed, Aug 6, 2008 at 9:17 AM, Clinton Begin <clinton.begin@gmail.com> wrote:
If you don't mind running a hacked version of the framework, you could hack AutoResultMap.java.

Clinton


On Wed, Aug 6, 2008 at 9:11 AM, Michael Schall <mike.schall@gmail.com> wrote:
Lance -

I'm pretty sure this is only a proposed feature for 3.0.  Jason's example is the only way of mapping columns to properties that I'm aware of in 2.x.

http://opensource.atlassian.com/confluence/oss/display/IBATIS/iBATIS+3.0+Whiteboard#iBATIS3.0Whiteboard-SomePossibleConfigurationOptions

Mike


On Wed, Aug 6, 2008 at 9:57 AM, Jason Kratz <jason.kratz@firm58.com> wrote:
Not sure I understand you.  This is exactly how a resultMap works (and core to iBATIS)

<resultMap id="getPaymentResult" class="payment">
<result property="paymentId" column="PAYMENT_IDI"/>
....



On Aug 6, 2008, at 9:39 AM, Lance Java wrote:

I would like to change the default column --> property name mapping functionality.
eg in my db, column names are of the form "column_name" whereas properties are of the form "columnName"
 
I have read through the documentation and there is no mention of providing my own column --> property name mapper.
 
I realise that I can use "select column_name AS columnName" but this does not work for "select *" or stored procedures etc.
 
 
Cheers,
Lance.




------=_Part_5499_32231440.1218035884397--