码迷,mamicode.com
首页 > Web开发 > 详细

Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: wrong column type encountered in column [others] in table [auth_user]; found [varchar (Types#VARCHAR)], but expec

时间:2019-10-01 22:39:29      阅读:227      评论:0      收藏:0      [点我收藏+]

标签:expect   pre   code   jpa   int   配置   char   使用   div   

Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: wrong column type encountered in column [others] in table [auth_user]; found [varchar (Types#VARCHAR)], but expecting [integer (Types#INTEGER)]

这个错误是由于使用springdatajpa 将ddl-auto配置为validate

假如说:

当表中字段others是varchar类型, 实体类entity的others是Integer类型,
类型不匹配报错:

Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: wrong column type encountered in column [others] in table [auth_user]; found [varchar (Types#VARCHAR)], but expec

标签:expect   pre   code   jpa   int   配置   char   使用   div   

原文地址:https://www.cnblogs.com/qingmuchuanqi48/p/11616154.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!