You need to place the EntityQuery in a longer scope to retain the sort criteria it holds
(or somehow place the criteria in a longer scope).
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119434#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...