Hi!
Using Hibernate 2.1.4 is there any way to specify dialect specific SQL code to fine-tune how a CREATE TABLE statement will turn out? We're currently using MySQL 4.1.3-beta and would like to specify a column's collation which is different from the default table collation.
The CREATE TABLE statement should look something like this:
Code:
CREATE TABLE Test
(
id INTEGER,
email VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin
);
In a mapping file for a property we would like to do something like:
Code:
<property name="email" type="string">
<dialect-specific dialect="mysql" code="CHARACTER SET utf8 COLLATE utf8_bin"/>
</property>
It there any way to achieve this? We could of course use extra database specific scripts to alter the tables after they have been created but it would be nice to get the correct statements directly from hibernate.
Regards,
Niklas Therning