This content has been marked as final.
Show 2 replies
-
1. Re: Maybe a bug on EntityManager.createNativeQuery(String)
zengchuan Nov 10, 2006 9:01 PM (in response to petrilla)I have the same problem.
-
2. Re: Maybe a bug on EntityManager.createNativeQuery(String)
stephen.friedrich Feb 25, 2009 6:38 AM (in response to petrilla)Still a problem in current hibernate.
My workaround is to use a custom dialect:public class FitOracle9iDialect extends Oracle9iDialect { public String getHibernateTypeName(int code, int length, int precision, int scale) throws HibernateException { if (code == Types.CHAR && length > 1) { return "string"; } return super.getHibernateTypeName(code, length, precision, scale); } }
Other dialects have the same problem.
There probably is a cleaner way to configure the dialect, but this seems to work fine for me.