title: NonUniqueResultException thrown when using spring jpa "findtop"
body: <p>I am using Spring JPA, and NonUniqueResultException throw when I use "findTop" keyword</p>
  
  <p>Java source:</p>
  
  <pre><code>Optional&lt;ClassA&gt; findTopByXXXOrderByIdDesc(String xxx);
  </code></pre>
  
  <p>Then get the exception:</p>
  
  <blockquote>
    <p>exceptionType = org.springframework.dao.IncorrectResultSizeDataAccessException exception = result returns more than one elements; nested exception is javax.persistence.NonUniqueResultException: result returns more than one elements</p>
  </blockquote>
  
  <p>Any one know what happen?</p>