openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chuongpham <chuonglep...@gmail.com>
Subject Is this possible with CriteriaBuilder method
Date Mon, 18 Apr 2011 11:01:16 GMT
Can I convert this native MySQL query using purely the CriteriaBuilder
method:

SELECT @rownum:=@rownum+1 'no', m.title, m.author,
REPLACE(SUBSTRING_INDEX(m.content, ' ', 20), '<br>', ' '), m.viewed,
m.hashid FROM book m, (SELECT @rownum:=0) r WHERE m.lang = ?1 AND m.title
like CONCAT('%',?2,'%') ORDER BY m.title asc

I can't find a similar example to reference from the JEE 6 Tutorial
available at Oracle website.


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

Mime
View raw message