hi ellen,
ellen wrote:
My question is: how do I call registerColumnType(2,"decimal($p,$s)")?
The only solution i saw was to simply create my own patched mysql dialects based on the mysql dialects that ship with hibernate:
- MySQLPatchedDialect is identical to MySQLDialect but in it's constructor calls registerColumnType(2, "decimal($p,$s)") (rather than registerColumnType(2, "numeric($p,$s)")).
- MySQL5PatchedDialect is identical to MySQL5Dialect but extends MySQLPatchedDialect (rather than MySQLDialect)
- MySQL5InnoDBPatchedDialect is identical to MySQL5InnoDBDialect but extends MySQL5PatchedDialect (rather than MySQL5Dialect)
- in my hibernate mapping file i then use MySQL5InnoDBPatchedDialect rather than MySQL5InnoDBDialect.
Not very elegant but safe ;-)
Please note that i've also created the JIRA issue HHH-2582 for this.
cheers,
gerald