]
Diego Pires Plentz resolved HHH-1396.
-------------------------------------
Resolution: Fixed
Fix Version/s: 3.3
Closing as "fixed" since the main problem is solved and the "comment
problem" is fixed by HHH-2315.
Table.validateColumns fails on valid column
-------------------------------------------
Key: HHH-1396
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1396
Project: Hibernate3
Issue Type: Bug
Components: metamodel
Affects Versions: 3.1.1
Reporter: Christopher G. Stach II
Assignee: Diego Pires Plentz
Priority: Minor
Fix For: 3.3
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)
[...]
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: