Accoriding to hibernate document: section 6.5. Type registry: http://docs.jboss.org/hibernate/orm/3.6/reference/en-US/html/types.html
We can create a new user type and override existing hibernate's basic types. To use the new user type we need to register it using (see above link):
Configuration cfg = ...;
cfg.registerTypeOverride( new SuperDuperStringType() );
But never in document mentioned how we can register it in hibernate.cfg.xml? I can't believe they forgot to add this to hibernate.cfg.xml, Does anybody know about this? Thanks
Take a look at that post: Mapping A Custom Type In Hibernate
It worked for me with the following little modification:
the hibernate-mapping closing tag is wrongly formed, it misses the
/
(slash).Appart from that, it explains everything.