>select t0."CATEGORY_ID", t0."CATEGORY_NAME", t0."PARENT_CATEGORY_ID", t0."DISPLAY_ORDER", t0."VERSION" from "AAHM_CATEGORY" t0, "AAHM_CATEGORY" t1 order by t0."DISPLAY_ORDER"
I do not see anything wrong with the SQL above. Which database you are
executing against? Have you tried directly executing the sql against
database using its native tool to see which part is not liked by the
database.
Not directly related but, one strange thing to observe here is that
where clause in generated SQL does not contain the conditions from where
clause you have specified in your EJBQL. Is it possible that you are
packaging a different version of descriptors than shown in your post?
Thanks,
Mitesh