ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j-lists <jamisonli...@gmail.com>
Subject Re: Property starting with 'i' character in Turkish Locale
Date Mon, 07 Nov 2005 02:15:48 GMT
I have no idea why this is happening to you but I suggest that this article
might offer some insight:
http://cafe.elharo.com/java/turkish/

-J


On 11/5/05, Bahri Gencsoy <bahri.gencsoy@gmail.com> wrote:
>
>   Think about the most simple database table, just containing ID column as
> an integer:
>
>   CREATE TABLE SAMPLE(ID INTEGER NOT NULL PRIMARY KEY)
>
>    And very simple mapping configuration, as stated in the tutorial:
>
>   <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE sqlMap
> PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
> " http://www.ibatis.com/dtd/sql-map-2.dtd">
> <sqlMap namespace="Sample">
> <select id="getSample" resultClass=" mypackage.Sample">
> SELECT
> ID as id
> WHERE ID = #value#
> </select>
> </sqlMap>
>
>    And '*Sample'* bean with "getId()" and "setId(int i)" methods.
>
>   All the other configurations are handled as needed. The problem is, the
> returned object's "id" property is never set in Turkish locale! It is easy
> to regenerate:
>
>   Locale.setDefault(new Locale("tr")); //if you change this with "en", it
> works!
>
> Sample sample = (Sample) map.queryForObject("getSample", new Integer(3));
> System.out.println(sample.getId()); //0 value, instead of 3
>
>    It just works fine if you change locale to "en", but not acceptable for
> me!!! And I don't want to change & switchback locale everytime.
>
>   'i' is a special character in Turkish, unlike the other latin languages,
> capital 'i' is 'İ' for Turkish, not 'I'. (I am not sure if you will see the
> difference in the mail, 'I' with a dot above it-can not remember the
> technical name). I tried to track the problem for 2 hours, but little
> success. I think the problem is in mapping from XML to property names, since
> I have seen that (while debugging) reflection for bean gives correct
> property names (in com.ibatis.common.beans.ClassInfo class's addMethods()method).
>
>   I'm using hsqldb 1.8.0.1 <http://1.8.0.1/> and ibatis 2.1.5 (latest
> versions up to date)
>
>     Any advice?
>
>   Thanks in advance,
>
> Bahri GENCSOY
>
>
Mime
View raw message