Skip to:
This may be an Annotations bug (3.1beta8), bug the exception happens in Core.
This column used to pass when I used this:
@Column(columnDefinition = "INT UNSIGNED NOT NULL DEFAULT 0", nullable = false)
I have since changed it to
@Column(columnDefinition = "INT UNSIGNED DEFAULT 0", nullable = false)
because "nullable = false" adds the "not null".
I am guessing that the nullable isn't being used in the validateColumns. I have not yet investigated, but the stack trace is below.
org.hibernate.tool.hbm2ddl.TableMetadata.<init> table found: xxx.yyyorg.hibernate.tool.hbm2ddl.TableMetadata.<init> columns: [foo_id, ipaddress, actiontype, timestamp, id]com.caucho.server.webapp.Application.start org.hibernate.HibernateException: Wrong column type: ipAddress, expected: INT UNSIGNED DEFAULT 0at org.hibernate.mapping.Table.validateColumns(Table.java:219)at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:964)at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116)at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:296)at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1164)[...]
Bulk closing stale resolved issues
Closing as "fixed" since the main problem is solved and the "comment problem" is fixed by HHH-2315.
yes - just telling what the general issue is generally the validatecolumn method is waay to naive.
Max, the first part of the problem I already solved.
this is a well known issue with schemavalidator - it does not handle compatible types, but with different string names correctly.
search for validator issues and you will see ,)
This may be an Annotations bug (3.1beta8), bug the exception happens in Core.
This column used to pass when I used this:
@Column(columnDefinition = "INT UNSIGNED NOT NULL DEFAULT 0", nullable = false)
I have since changed it to
@Column(columnDefinition = "INT UNSIGNED DEFAULT 0", nullable = false)
because "nullable = false" adds the "not null".
I am guessing that the nullable isn't being used in the validateColumns. I have not yet investigated, but the stack trace is below.
org.hibernate.tool.hbm2ddl.TableMetadata.<init> table found: xxx.yyy
org.hibernate.tool.hbm2ddl.TableMetadata.<init> columns: [foo_id, ipaddress, actiontype, timestamp, id]
com.caucho.server.webapp.Application.start org.hibernate.HibernateException: Wrong column type: ipAddress, expected: INT UNSIGNED DEFAULT 0
at org.hibernate.mapping.Table.validateColumns(Table.java:219)
at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:964)
at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:296)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1164)
[...]