Thanks, Kevin. My original post had "@rownum:=@rownum+1" in it because at the
time I couldn't figure out a way to number return records using Primefaces
dataTable component. I have now so I have modified my original post.

Still, I find this query "SELECT m.title, m.author,
REPLACE(SUBSTRING_INDEX(m.content, ' ', 20), '<br>', ' '), m.viewed,
m.hashid" hard to implement with the CriteriaBuilder method. I don't know if
it's possible - haven't seen anything similar in the JEE 6 Tutorial at
Oracle website.

My understanding of the CriteriaBuilder method is that by default, the
method will select all columns identified in your entity. Unless someone
points me in the right direction, I may have to stick with JPQL.

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

Reply via email to