title: How to cast nativeQuery list to jpa query list?
body: <p>I have two query list:</p>
  
  <pre><code>List&lt;A&gt; list1;
  Query query = em.createQuery(sql);
  list1=query.getResultList();
  return list1;
  </code></pre>
  
  <p>and another list is:</p>
  
  <pre><code>List&lt;A&gt; list2;
  Query query = em.createNativeQuery(sql);
  list2=query.getResultList();
  return list2;
  </code></pre>
  
  <p>when I tried to initialize </p>
  
  <pre><code>list1=list2
  </code></pre>
  
  <p>which I want to do for my requirement. But I got following exception </p>
  
  <pre><code>Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to A
  </code></pre>
  
  <p>Please help me about this issue. Thanks</p>