[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Maybe a bug on EntityManager.createNativeQuery(String)

stephen.friedrich do-not-reply at jboss.com
Wed Feb 25 06:39:11 EST 2009

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.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4212920#4212920

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4212920

More information about the jboss-user mailing list