I'm trying to manage a table on an DB2/400 with a EJB3 entity bean but Hibernate failes to correctly map the database data type to a data type in the entity bean.
The column type is defined as follows:
PREIS DECIMAL(12,5)
@Column(name = "PREIS", precision = 13, scale = 5) public BigDecimal getPreis() {...
javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: PREIS, expected: numeric(13,5) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:720) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127) ...
@Column(name = "PREIS", columnDefinition = "DECIMAL(13,5)")
javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: PREIS, expected: DECIMAL(13,5) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:720) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127) ...
@Column(name = "PREIS", columnDefinition = "DECIMAL(13,5)", precision = 13, scale = 5, nullable = true)