HI,
I got a problem with a postgreSQL database (9.2.2) and hibernate (3.2.6.ga).
Exception:
Code:
org.hibernate.HibernateException: Wrong column type in public.alert for column LEVEL. Found: int4, expected: INTEGER
at org.hibernate.mapping.Table.validateColumns(Table.java:261)
at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1089)
at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:317)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
hbm.xml:
Code:
<property name="level" type="com.intesens.idp.model.alert.domain.AlertLevelEnum">
<column name="LEVEL" not-null="true" unique="false" sql-type="INTEGER"/>
</property>
SQL script:
Code:
create table ALERT (
ID BIGINT not null,
LEVEL INTEGER not null,
primary key (ID)
);
int4 is an alias for integer (postgresql documentation). Is there a bug with that in this hibernate release ?
Does anybody already got this ?
Thanks in advance.