MySQL does not support varchar fields with naming a length >=256 table as "role" . (varchar(256)) You have to quote the table name like `role` - then it works. Seems this is a special keyword in mysql. see http://dev.mysql.com/doc/refman/8.0/en/ char roles .html
Up to varchar(255) everything is fine but then problems start. The hibernate SchemaExport silently ignores the problem if haltonerror=false. If haltonerror=true Is it fails long before the real problem comes up while droping missing constraints. I am not sure if it is really fair to blame hibernate or the hibernate dialect for mysqls behavior. So classification as "bug" might be wrong..
Would it be possible to introduce a way to switch automatically to a different datatype like text for varchar 256 and greater solve this problem in the schema generation? Or would it just be the best solution to switch to mysql type "text" in general instead of "varchar" in the dialect?
see http://dev.mysql.com/doc/refman/8.0/en/blob.html |
|