ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Parkinson" <pa...@avaning.com>
Subject RE: A couple newbie questions
Date Thu, 06 Dec 2007 13:05:17 GMT
Hi Larry:

I wasn't going to use column indexes (fragile) but this solution is
perfect.

Thanks.

parki...


-----Original Message-----
From: larry.meadors@gmail.com [mailto:larry.meadors@gmail.com] On Behalf
Of Larry Meadors
Sent: Wednesday, December 05, 2007 11:06 PM
To: user-java@ibatis.apache.org
Subject: Re: A couple newbie questions

In my experience, column indexes are kind of fragile - I prefer to
alias the fields like this:

select customer.name as "customerName", product.name as "productName"
from....

Larry


On Dec 5, 2007 3:54 PM, Jeff Butler <jeffgbutler@gmail.com> wrote:
> It's not magic, but you could also use columnIndex in your result map
> instead of column - then you wouldn't need to do any renaming in the
SQL
> statement.
>
> Jeff Butler

Mime
View raw message