title: JPQL limit query
body: <p>How can I limit in a select query of JPQL named query? I need the limit to be done in the query level itself and not in the java layer!!!
  I am trying to use</p>
  
  <pre><code>@NamedQueries(value = {
          @NamedQuery(name = UserNotification.QueryName.NOTIFICATION_DISPLAYED,
                      query = "SELECT un FROM UserNotification un " +
                              "WHERE un.orgId IN (:orgList) " +
                              "AND un.user.id = :userId LIMIT 5")
  </code></pre>
  
  <p>but in vain!!!</p>
  
  <p>Please suggest </p>