I'm using Jboss 4.2.2 with Hibernate 3.2.4.sp1.  I have a few data types to 
persist from my entity which are of java type byte[].

Hibernate, by default, is using mysql type tinyblob for these.  How do I 
override this and get Hibernate to use the type varbinary instead?

After hibernate creates the database schema, I am able to change this manually 
by altering the tables, and everything appears to function fine, but I would 
prefer to have this done automatically.

Besides, if I change the hdm2ddl behavior from update to validate, hibernate 
will fail to validate the schema because the columns are of type varbinary 
instead of tinyblobs.

Any help with this would be greatly appreciated.  I've tried using the @Type 
annotation, but I have no idea what type I should place in there for this to 
work.  My database is mysql 5.0.44 with the InnoDB table engine, I am using the 
org.hibernate.dialect.MySQL5InnoDBDialect as my hibernate dialect.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170594#4170594

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170594
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to