openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <>
Subject Re: Is this possible with CriteriaBuilder method
Date Fri, 22 Apr 2011 15:30:25 GMT
>  gather then that this is not possible with the CriteriaBuilder method?! 

This SQL query:
[SELECT m.title,, REPLACE(SUBSTRING_INDEX(m.content, ' ', 20),
'<br>', ' '), m.viewed, m.hashid FROM book m WHERE m.lang = ?1 AND m.title
like CONCAT('%',?2,'%') ORDER BY m.title asc]
is possible.

And so is getting the relative index o the selected row from the JPA query.

What does not seem possible is to write a query with @rownum to get the
relative index as part of the query result itself. 

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message