title: Could not extract ResultSet When i using Native Query in Spring Jpa
body: <p>I am trying to get true or false, with some compare condition using Spring JPA native query. But I got following Exception,</p>
  
  <pre><code>could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet
  </code></pre>
  
  <p>The query I am trying is:</p>
  
  <pre><code>SELECT case when ABS(am_savedagent.AGENT_VERSION)&lt; 1.8 then 'true' else 'false' end as bool 
  FROM am_savedagent where am_savedagent.BOX_ID="ots-JIO6Yn0jZbxs";
  </code></pre>
  
  <p>My Repository </p>
  
  <pre><code>public interface SavedAgentRepository extends JpaRepository&lt;SavedAgentDetails, String&gt;, JpaSpecificationExecutor&lt;SavedAgentDetails&gt; {
      @Query(value = "SELECT case when ABS(SavedAgentDetails.agentVersion)&lt; ?1 then 'true' else 'false' end as bool FROM SavedAgentDetails where SavedAgentDetails.boxId=?2", nativeQuery = true)
      public Optional&lt;List&lt;Object&gt;&gt; findByAgentVersionAndBoxId(String currentVersion, String boxid);
  }
  </code></pre>
  
  <p>I can't find y the Errors Comming. please help me, someone.</p>