[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3591?page=c...
]
Frank Zschage commented on HHH-3591:
------------------------------------
Hi Gail, I've created a maven test project (5 files, checktest.tar.gz). If you set
Hbm2DDLExporterTask.setExport() to true (in Hbm2DDLExporterTaskTest), the test will
succeed, even though a MySQL error occures. The error message gets passed to the logging
engine, but no exception gets thrown at least.
In detail the main error is situated in org.hibernate.mapping.Table.sqlCreateString(). The
check constraint gets added first and the comment afterwards which is not allowed in MySQL
5.0 and 5.1 (don't know about 6.0).
best regards
MySQL check constraint and column comment are not generated in
correct order
----------------------------------------------------------------------------
Key: HHH-3591
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3591
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.1
Environment: Hibernate Core 3.3.1 and Head Revision, MySQL 5.0, 5.1
Reporter: Frank Zschage
Attachments: checktest.tar.gz
In case of MySQL the column comment is part of the core column definition whereas the
check constraint is part of the constraint definition and needs to be placed somewhere
after the core column defintion.
Hibernate creates the following syntax:
create table checktest (
testcol varchar(5) not null check(...) comment '...', ... ) ...
MySQL requires the following syntax:
create table checktest (
testcol varchar(5) not null comment '...' check(...), ... ) ...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira