Hibernate version:
2.1.7b
Hi,
I'm using a user type BinaryBlobType to map a blob to a byte[] (as described in
http://www.hibernate.org/73.html) and SchemaExport to generate the DDL.
Everything is fine for MS SQL Server - SchemaExport creates an
Code:
image
column for the blob field which has a maximum size of 2GB.
Under MySQL the SchemaExport generates the datatype
Code:
blob
which has a maximum size of
only 64KB.
MySQL differentiates between blob (64KB), mediumblob (16MB) and longblob (4GB).
I have seen that the SchemaExport XML-attribute "sql-type" allows overriding of the automatic datatype detection - but I really don't like that.
Shouldn't be
Code:
longblob
the default blob datatype under MySQL? I mean - a blob with a 64KB limit is more a "bob" than a "blob". ;-)