[hibernate-dev] CharacterTypeMapping within Oracle10gDialect
Chris Bredesen
cbredesen at redhat.com
Wed Nov 12 10:55:16 EST 2008
A CLOB is an entirely different animal than a text/char/varchar column.
I'd be somewhat surprised to find out that my Types.VARCHAR got turned
into a LOB, personally - even if they are not recommended on Oracle. Of
course you can extend the Dialect in any way you see fit, or just map
your property as a CLOB from the get go. Not that I'm not a fan of
CLOBs, I am; it's just that VARCHAR conceptually maps better to a long
than to a CLOB.
My 2 cents :)
Thorsten Gast wrote:
> Hi,
>
> I just wonder if there is any reason, why the Oracle10gDialect uses the characterTypeMapping of the Oracle9iDialect, and doesn't implement its own. As far as I know is the usage of long-columns in Oracle10g "deprecated" and should be replaced by clobs.
>
> Shouldn't look the mapping something like this?
>
> ---- snippet ----
> protected void registerCharacterTypeMappings() {
> registerColumnType( Types.CHAR, "char(1 char)" );
> registerColumnType( Types.VARCHAR, 4000, "varchar2($l char)" );
> registerColumnType( Types.VARCHAR, "clob" );
> }
> ---- snippet ----
>
> Or are there any reasons why I should prefer the usage of long-columns within hibernate.
>
> Best regards
>
> Thorsten
>
>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
More information about the hibernate-dev
mailing list