openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chuongpham <>
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

SELECT @rownum:=@rownum+1 'no', m.title,,
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:
Sent from the OpenJPA Users mailing list archive at

View raw message