openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <ppod...@apache.org>
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, m.author, 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. 

-----
Pinaki 
--
View this message in context: http://openjpa.208410.n2.nabble.com/Is-this-possible-with-CriteriaBuilder-method-tp6283183p6297276.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message