You can only order by a path statement, becaused it has to be converted into the actuall columns. Specifically, you can't order by a parameter. Since you are already using DynamicQL, I suggest you just generate a statement instead of passing a parameter. For example: [pre]
String query = "SELECT OBJECT(g) FROM UserInfo g " +
"ORDER BY g." + OrderBY;
Hi! I have trouble put this query as dynamic QL. can u give me a hint how to use the following query:
String query = "select Object(g) FROM userInfo g" + "Order BY g." + OrderBy
I read the CMP examples, it seems that when I use the Dynamic QL with Set ejbSelectGeneric(String jbossQl, Object arguments), the arguments are always required,
while the above query doesnot have any argument, is there other ways to use Dynamic QL without using the ejbSelectGeneric ?