title: org.postgresql.util.PGobject cannot be cast to org.postgresql.util.PGobject
body: <p>I'm getting the above-mentioned error from the following (The <code>println()</code> call shows that the <code>resultObj</code> is indeed a <code>PGobject</code>):</p>
  
  <pre><code>public List&lt;Search&gt; findSearchesBySearchString(String searchString) throws ClassNotFoundException{
      List&lt;Search&gt; searchResults = new ArrayList&lt;&gt;();
      String queryString = "SELECT s FROM Search s WHERE '"+ searchString +"' = ANY(s.searchstrings)";
      Query query = em.createNativeQuery(queryString);
      List&lt;Object&gt; objectResultsList = query.getResultList();
      for(Object resultObj: objectResultsList){
          System.out.println("***********************************************************"+ resultObj.getClass());
          PGobject resultObject = (PGobject)resultObj; // ClassCastException thrown here
          Search search = new Search();
  </code></pre>
  
  <p>Thanks</p>