How to map a MySQL char(n) column to an instance variable using a JPA/Hibernate annotation?

后端 未结 2 1704
一向
一向 2020-12-16 12:53

I encounter a JPA/Hibernate mapping problem on a column \"language\" in a MySQL table whose type is char(7). In my entity, the code generated for the field is:



        
2条回答
  •  既然无缘
    2020-12-16 13:28

    Try this:

    @Column(name="language",columnDefinition="char(7)")
    

    see if that works.

提交回复
热议问题