Re: AbstracJdbc2ResultSet getColumnIndex throws missing column when using with Hibernate

From: Kris Jurka <books(at)ejurka(dot)com>
To: Hakan Cunier <hakanc(at)docuart(dot)com(dot)tr>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: AbstracJdbc2ResultSet getColumnIndex throws missing column when using with Hibernate
Date: 2008-02-19 06:14:13
Message-ID: Pine.BSO.4.64.0802190113100.27831@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Thu, 4 Jan 2007, Hakan Cunier wrote:

> We have a table named as DYSMESSAGES (ID number, FROM varchar(100)...)
>
> We use hibernate with postgresql-jdbc-8.2-504 driver and PostgreSQLDialect.
> Our hql is "from Dysmessages".
>
> Hibernate convert this hql to "select dysmessage0.ID as ID204_,
> dysmessage0.FROM as FROM204_ from DYSMESSAGES dysmessage0" native sql
> format.
>
> Our jvm Works on Jboss / Windows XP Pro Turkish / Turkish Regional Settings
>
> Hibernate throws exception as no column found named as ID204_ in this
> resultset.
>
> Then we looked at AbstracJdbc2ResultSet class's getColumnIndex method. It
> uses toLowerCase(). So problem is that. It should use
> toLowerCase(Locale.ENGLISH).
>

Fixed in CVS and backpatched to 8.0.

Kris Jurka

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Till Toenges 2008-02-19 08:25:40 Re: Implementing setQueryTimeout()
Previous Message Kris Jurka 2008-02-19 05:33:08 Re: JDBC XA Support and Sample code?