First I want to do a query like
"select count(*) from Post p where p.tag in (tagArray) "
where tagArray is “‘tag1′,’tag2’,’tag3′”.then I’d like to do a paginate query:
query.setFirstResult(int1).setMaxResult(int2);
I don’t know how to write this query. I searched the posts ,can’t find answers, so can anybody give me any advice? thanks.
Thank you very much! Following your instruction, I’ve done it like this,a little complicated.