title: Problem updating BLOB with Hibernate?
body: <p>i am having problem updating a blob with hibernate. (i am using Hibernate 3.3.1-GA)</p>
  
  <p>my model have these getters/setters for hibernate,
  i.e. internally i deal with byte[] so any getter/setter convert the
  byte[] to blog.</p>
  
  <p>I can create an initial object without problem, but if I try to change the content of the blob, the database column is not updated. I do not get any error message, everything looks fine, except that the database is not updated.</p>
  
  <pre><code>/** do not use, for hibernate only */
  public Blob getLogoBinaryBlob() {
      if(logoBinary == null){
          return null;
      }
      return Hibernate.createBlob(logoBinary);
  }
  
  /** do not use, for hibernate only */
  public void setLogoBinaryBlob(Blob logoBinaryBlob) {
  
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      try {
          logoBinary = toByteArrayImpl(logoBinaryBlob, baos);
      } catch (Exception e) {
      }
    }
  </code></pre>
  
  <p>my hibernate mapping for the blob looks like</p>
  
  <pre><code>&lt;property name="logoBinaryBlob" column="LOGO_BINARY" type="blob" /&gt;
  </code></pre>
  
  <p>The database used is Oracle.</p>