You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Tomáš Procházka <t....@centrum.cz> on 2009/11/12 21:34:53 UTC
ibator and enum colum type
Another issue that I found in ibator is that he doesn't support Enum type when database has enum column. It generate pojo object as String for this field :-(
Will be this supported?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org
Re: ibator and enum colum type
Posted by Tomáš Procházka <t....@centrum.cz>.
Thanks you, I will try it.
And foreign key will be supported by Ibator?
To generare something like this:
<resultMap id=”blogResult” type=”Blog”>
....
<association property="author" column="blog_author_id" javaType="Author" select=”selectAuthor”/>
</resultMap>
______________________________________________________________
> Od: "Jeff Butler" <je...@gmail.com>
> Komu: user-java@ibatis.apache.org
> Datum: 13.11.2009 00:01
> Předmět: Re: ibator and enum colum type
>
>Enum is not a standard JDBC type, so Ibator won't know what to do with it.
>
>However, I just did a quick test and it works fine if you configure it
>correctly. Steps:
>
>1. You will need to define the corresponding Java enum yourself (foo.bar.MyEnum)
>
>2. Then do a column override in the Ibator configuration:
>
><table name="someTable">
> <columnOverride column="someColumn" javaType="foo.bar.MyEnum"/>
></table>
>
>This works as expected. I've checked in a new test to prove it for the future.
>
>Jeff Butler
>
>
>2009/11/12 Tomáš Procházka <t....@centrum.cz>:
>>
>> Another issue that I found in ibator is that he doesn't support Enum type when database has enum column. It generate pojo object as String for this field :-(
>> Will be this supported?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
>> For additional commands, e-mail: user-java-help@ibatis.apache.org
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
>For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org
Re: ibator and enum colum type
Posted by Jeff Butler <je...@gmail.com>.
Enum is not a standard JDBC type, so Ibator won't know what to do with it.
However, I just did a quick test and it works fine if you configure it
correctly. Steps:
1. You will need to define the corresponding Java enum yourself (foo.bar.MyEnum)
2. Then do a column override in the Ibator configuration:
<table name="someTable">
<columnOverride column="someColumn" javaType="foo.bar.MyEnum"/>
</table>
This works as expected. I've checked in a new test to prove it for the future.
Jeff Butler
2009/11/12 Tomáš Procházka <t....@centrum.cz>:
>
> Another issue that I found in ibator is that he doesn't support Enum type when database has enum column. It generate pojo object as String for this field :-(
> Will be this supported?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org