Nick,
Yes hibernate types coverse most SQL type.
Quote:
Do you know why it would be a good idea to use sql-type?
Well, it depends on you database design and requirements.
Sometimes you need char(3) and not varchar(3) so you overide the hibernate definition type for string by
saying
<column name="code" sql-type="char(3)"/>
instead of
<column name="code" type="string" length="3" />
since you are aware that the variable will be of a constant lenght of 3 and not a variable of max length of 3. Char(3) is more optimized for speed and Varchar(3) is more optimized for storage.
or if your database provider uses a datatype called currency and you do not want to use hibernate currency type which maps to VARCHAR
I do not think there are fix rules but rather a design related approach.
Cheers