title: Operator does not exist: text = bigint
body: <p>I am trying to get our application that is currently running on glassfish 2.1 to work on jboss 6.1. And have the following problem, I don't think its related to the application server but rather something to do with postgres and /or hibernate.</p>
  
  <p>Using the following software Postgresql 9.0, hibernate 3.6.6 on jboss and 3.2 on glassfish </p>
  
  <p>Anyway, the problem.</p>
  
  <p>this named query:</p>
  
  <pre><code>    @NamedQuery(name="entry.updateDuplicate",
      query="UPDATE entry SET timestamp = :timestamp WHERE username = :username AND searchDocument = :searchDocument")
  </code></pre>
  
  <p>this code:</p>
  
  <pre><code>    Query query = em.createNamedQuery("Entry.updateDuplicate");
      query.setParameter("timestamp", new Date(System.currentTimeMillis()));
      query.setParameter("username", username);
      query.setParameter("sDocument", sString);
  
      int affected = query.executeUpdate();
  </code></pre>
  
  <p>generates this fault in the log:</p>
  
  <pre><code>    10:28:16,149 INFO  [STDOUT] Hibernate: update fu set c_timestamp=? where c_username=? and c_document=?
      10:28:16,165 WARN  [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 42883
      10:28:16,165 ERROR [org.hibernate.util.JDBCExceptionReporter] ERROR: operator does not exist: text = bigint
      Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
      Position: 77
  </code></pre>
  
  <p>the table is this:</p>
  
  <pre><code>    TABLE fu
      (
      id bigint NOT NULL, document text, timestamp timestamp without time zone, username character varying(255), CONSTRAINT fu_pkey PRIMARY KEY (c_id)
      )
  </code></pre>
  
  <p>Anyone have any idea, to me it seams like it has something to do with 'id' (the only bigInt field) but I can't figure out why or how to begin to solve it.</p>
  
  <p>Any suggestion is most welcome!</p>