Kevin,
we looked at different queries
I read this one from the (original?) post:
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
On a second look I see you post a different one with @rownum in SELECT
projection clause etc.
Firstly, I do not have an answer for that @rownum trick using Criteria API.
Secondly, I though the question is about that REPLACE() function.
Thirdly, the trick is not required at all with JPA query. The @rownumber
stuff add a monotonic row number to the selected results. But JPA results
are in a java.util.List anyway which is ordered by definition!
-----
Pinaki
--
View this message in context:
http://openjpa.208410.n2.nabble.com/Is-this-possible-with-CriteriaBuilder-method-tp6283183p6291279.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.