guidewiregosu

Guidewire SQL Query - compare on longtext field


I am trying to run this query

var q = Query.make(Invoice).compare(Invoice#Note_UFA, Relop.Equals, "test").select()

and I am getting this error "Cannot search on column Note_UFA. Is it a CLOB or a BLOB?"

How do I make Note_UFA field something that I can use the compare with?

Here is how it is currently configured.

  <column
    desc="Note"
    name="Note_UFA"
    nullok="true"
    type="longtext"/> 

You should know that this is a new field, so I can configure it however I wish. I am not stuck wtih the datatype longtext. However, if there is a way to change an existing field so that it can be used with the compare that would be nice to know.


Solution

  • It looks like this is going to be my answer, make the field a varchar

      <column
        desc="Note"
        name="Note_UFA"
        nullok="true"
        type="varchar">
        <columnParam
          name="size"
          value="500"/>