JPA/Hibernate DDL generation; CHAR vs. VARCHAR

前端 未结 2 424
执念已碎
执念已碎 2020-12-31 11:29

I have a JPA/Hibernate data model that I am using the Hibernate hbm2ddl tool to generate database DDL. I have some strings that should be CHAR and some that may be VARCHAR i

2条回答
  •  攒了一身酷
    2020-12-31 12:10

    Annotate the strings you want to map to a CHAR in the database with @Column(columnDefinition="CHAR()").

提交回复
热议问题