• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate mapping sql char to java char  RSS feed

Marek Kisiel
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a column in my mysql table: zip char(6).
I know that I can map this field as a string, but I want to use simply char type.

Exception that I am getting when I try this:

SEVERE: IllegalArgumentException in class: prenumer.beans.Adres, setter method of property: kod
2009-09-29 12:54:50 org.hibernate.property.BasicPropertyAccessor$BasicSetter set
SEVERE: expected type: [C, actual value: java.lang.Character

sourcecode (I try to use 2 setters method):


<property name="zip" type="character" length="6"/>

Could somebody give me advice?

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!