JPQL limit and Offset

DrakunDry's picture
DrakunDry
Status: 
Open

Hi , i want to take the 2 most recent row from my table.
but i have a problem with JPQL code :

Comments

Submitted by Sean McP on Fri, 11/18/2016 - 21:34

Why is this in Idea? Surely it's a question?

However I agree that using JPQL is not as flexible as using full SQL...

The way we do this type of thing, which is not very scientific is to:

In our BDM - create a custom query

  1. Select * from Table1 order by persistanceId Desc;

And in our code we do

  1. for (I=0;i<2,i++){
  2. get record into Array;
  3. }
  4. return Array;

regards
Seán

Testing
Notifications