title: Why has Hibernate switched to use LONG over CLOB?
body: <p>It looks like that Hibernate started using <code>LONG</code> data type in version 3.5.5 (we upgraded from 3.2.7) instead of <code>CLOB</code> for the property of <code>type="text"</code>.</p>
  
  <p>This is causing problems as <code>LONG</code> data type in Oracle is an old outdated data type (see <a href="http://www.orafaq.com/wiki/LONG" rel="nofollow noreferrer">http://www.orafaq.com/wiki/LONG</a>) that shouldn’t be used, and tables can’t have more than one column having <code>LONG</code> as a data type.</p>
  
  <p>Does anyone know why this has been changed?</p>
  
  <p>I have tried to set the Oracle <code>SetBigStringTryClob</code> property to true (as suggested in <a href="https://stackoverflow.com/questions/1843484/hibernate-clob-oracle">Hibernate &gt; CLOB &gt; Oracle :(</a>), but that does not affect the data type mapping but only data transfer internals which are irrelevant to my case.</p>
  
  <p>One possible fix for this is to override the <code>org.hibernate.dialect.Oracle9iDialect</code>: </p>
  
  <pre><code>public class Oracle9iDialectFix extends Oracle9iDialect {
    public Oracle9iDialectFix() {
      super();
      registerColumnType(Types.LONGVARCHAR, "clob");
      registerColumnType(Types.LONGNVARCHAR, "clob");
    }
  }
  </code></pre>
  
  <p>However this is the last resort - overriding this class is step closer to forking Hibernate which I would rather avoid doing.</p>
  
  <p>Can anybody explain why this was done?
  Should this be raised as a bug?</p>
  
  <p>[UPDATE]: I have created <a href="https://hibernate.atlassian.net/browse/HHH-5569" rel="nofollow noreferrer">https://hibernate.atlassian.net/browse/HHH-5569</a>, let's see what happens.</p>