title: JPA native query returns no records
body: <p>This is method to get Module entites within specified level for related backend. </p>
  
  <pre><code>public List&lt;Module&gt; getModulesWithinLevel(Long backendId, ModuleLevel... levels) {
          String joinedLevels = serializeLevels(levels);
          Query query = entityManager.createNativeQuery("SELECT DISTINCT M.* FROM MODULES M JOIN ROUTING_SEQUENCES RS ON RS.BCK_ID = M.MOD_ID WHERE M.MOD_LEVEL IN (?) AND RS.BCK_ID = ?", Module.class);
          query.setParameter(1, joinedLevels);
          query.setParameter(2, backendId);
          List l = query.getResultList();
          return l;
      }
  </code></pre>
  
  <p>When i execute the exact query in sql developer i get one row as result.
  But this method returns empty List. No errors in logs - just empty list.
  What is wrong with my native query?</p>