I cannot get mysql to accept the 'check' constraint on 'create table' as created by hbm2ddl. The mysql docs indicate that it is valid, but ignored by all storage engines.
I had to create my own subclass of MySQLDialect and override supportsCheck() to false to get my table auto drop-create to work.
But surely I must be doing something wrong, as nobody else seems to have this problem.
Any suggestions would be much appreciated.
Hibernate version:
2.1.7c
Name and version of the database you are using:
MySQL 4.1
Connector/J 3.0.16, 3.1.5-gamma-bin
The generated SQL (show_sql=true):
Code:
create table AccountNature (
id bigint not null auto_increment,
class varchar(255) not null,
version integer not null,
NATURE_TYPE_ID varchar(255) not null unique,
ACCOUNT_ID bigint not null,
primary key (id),
check(all-delete-orphan)
)