Hi I have a Named Query
@NamedQuery(name = "StudyplanCategory.findByStatusAndLimit",
query = "SELECT s FROM StudyplanCategory s WHERE
s.status =:status LIMIT s.start=:start,s.end=end")
I want to set the limit like this:
@NamedQuery(name = "StudyplanCategory.findByStatusAndLimit",
query = "SELECT s FROM StudyplanCategory s WHERE
s.status =:status LIMIT s.start=:start,s.end=end")
But this is showing error at the start up of the Server. I am using the below code to call the query in the DAO class:
Query query = entityManager.createNamedQuery("StudyplanCategory.findByStatusAndLimit");
int end=(start*pageNumber);
query.setParameter("status", status);
query.setParameter("start", start);
query.setParameter("end", end);
return (List<StudyplanCategory>) query.getResultList();
Start and End Parameters needs to be set. Please Help.