1 / 1 / 4
Регистрация: 05.05.2017
Сообщений: 521
|
|||||||||||
1 | |||||||||||
Hibernate org.hibernate.HibernateException: Wrong column type18.10.2019, 11:46. Показов 906. Ответов 1
Метки нет (Все метки)
В модели было поле weight с типом double. Поменял на Integer и соответственно поменял в БД (postgresql)
org.hibernate.HibernateException: Wrong column type in public.ers_born_info for column weight. Found: int4, expected: float8 т.е. hibernate определяет поле как double. Как бороться с подобным? pgadmin генерирует следующий create для таблицы
Ради интереса попробовал изменить имя поля @Column(name = "weight1") и соответственно изменил в бд, но hibernate все равно ищет поле по старому имени org.hibernate.HibernateException: Missing column: weight in public.ers_born_info
0
|
18.10.2019, 11:46 | |
Ответы с готовыми решениями:
1
[Hibernate] A Foreign key has the wrong number of column. should be 0 Hibernate Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister Использование hibernate.hbm2ddl.auto совместно с MySql8 и Hibernate Org.hibernate.exception.JDBCConnectionException: Cannot open connection |
406 / 278 / 93
Регистрация: 14.03.2017
Сообщений: 777
|
|
18.10.2019, 12:11 | 2 |
Вы стирали БД саму?
Для hbm2ddl.auto попробуйте выставить create или create-drop
0
|
18.10.2019, 12:11 | |
18.10.2019, 12:11 | |
Помогаю со студенческими работами здесь
2
Spring mvc org.hibernate.LazyInitializationException: could not initialize proxy - no Session Org.hibernate.exception.GenericJDBCException: Connection is read-only. Queries leading to data modification ar Hibernate Hibernate Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |