Run two @NamedNativeQuery query on same entity Class
<p>I want to define two  @NamedNativequery on entity class . When tying to define eclipse gives a error.</p>

<blockquote>
  <p>Duplicate annotation of non-repeatable type @NamedNativeQuery. Only
  annotation types marked @Repeatable can be used multiple times at one
  target.</p>
</blockquote>

<p>From that error , I know we cannot define two define two @NamedNativeQuery of the entity class like</p>

<pre><code>    @Entity
    @Table(name = "abc")
    @NamedNativeQuery(name = "ABC.getSomeMethod1" query = "some_query",resultSetMapping ="abcDTO")//1st name query
   // @NamedNativeQuery(name = "some_name" query = "some_query",resultSetMapping ="some_dto")//try to define second query , but gives error
    public class ABC {

      }
</code></pre>

<p>I am using spring repository at dao layer to called the method which bind with this query</p>

<pre><code>  public interface SomeInterface extends JpaRepository&lt;ABC, Long&gt; {


    @Query(nativeQuery =true)
   List&lt;ABCDTO&gt; getSomeMethod1(@Param("someParam1")  long someParam1, @Param("someParam2") String someParam2);


   }
</code></pre>

<p>The senario is that I want to run the 1st native sql (which run fine) query and then run the 2nd  native sql query(want to run this also from same). How to solve this or What is the possible solution.</p>

<p>If this way I cannot run the two native sql query then is there any other to achive this. </p>