title: Hibernate large object type mismatch
body: <p>When I try to update an entry in hibernate using this method in my <code>DAOimpl</code> class:</p>
  
  <pre><code>public void setVoiceMailUnread(int id) {
          Session session = sessionFactory.openSession();
          Transaction transaction = null;
          VoiceMail vm = (VoiceMail)session.load(VoiceMail.class, id);
          try {
              transaction = session.beginTransaction();
              vm.setRead(false);
              transaction.commit();
          } catch (HibernateException e) {
              if (transaction != null)
                  transaction.rollback();
              e.printStackTrace();
          } finally {
              session.close();
          }
      }
  </code></pre>
  
  <p>I receive the following error:</p>
  
  <p><code>ERROR: ERROR: column "recording" is of type lo but expression is of type bigint
    Hint: You will need to rewrite or cast the expression.
    Position: 201</code></p>
  
  <p>In my entity class the instance variable recording is of type Blob:</p>
  
  <pre><code>@Entity
  @Table(name = "VOICEMESSAGES")
  public class VoiceMail implements Serializable {
       private int uniqueId;
       private int messageNumber;
       private String directory;
       private String context;
       private String macroContext;
       private String callerId;
       private String origTime;
       private String duration;
       private String flag;
       private String mailboxUser;
       private String mailboxContext;
       private Blob recording;
       private String label;
       private Boolean read;
       private String messageId;
  </code></pre>
  
  <p>.....</p>
  
  <pre><code>@Column(name = "RECORDING", unique = true, nullable = false)
  @Lob
  @JsonIgnore
  public Blob getRecording() {
      return recording;
  }
  
  public void setRecording(Blob recording) {
      this.recording = recording;
  }
  </code></pre>
  
  <p>Perhaps I am missing something related to anotations for large objects because the recording column in the db is of type "lo".
  Thank you for your answers!</p>