How map a bit type in Mysql to hibernate?

前端 未结 4 1644
情书的邮戳
情书的邮戳 2021-01-04 14:20

i use the reverse engeneering in my class and get this:

@Entity
@Table(name = \"user\", catalog = \"bytecode\", uniqueConstraints =
@UniqueConstraint(columnN         


        
4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-04 15:06

    http://bugs.mysql.com/bug.php?id=28422 suggests it is a bug. http://www.xaprb.com/blog/2006/04/11/bit-values-in-mysql/ suggests it would be wise to skip it. But of course you can't tell the DBA to not use a bit column in MySQL - meaning either we need to use and older version of MySQL (< 5.0.3) or not use MySQL's bit + Hibernate at all.

提交回复
热议问题