Not to mention weird existence of HQL entity in general, you have to use it for the very trivial SQL request. Why?.. Oh, that's a "short-cut" to automatically generate
very inefficient and wrong SQL query, I see.
You also need a pile of XML to configure your ORM. Then you need another pile of XML to map your database stuff to the objects through these entities. Ah, right, you also need those excellent entities themselves just to hard-design your application, thus making it rock-stubborn against any minimum changes, removing any possible flexibility without whole recoding and recompilation. After all at the end, you also need to hard-code your QUERIES_BASED_ON_VARIOUS_CRITERIA (look at the code in the example to understand what I am talking about).
*Sigh*... It is just all pathetic... Disappoints even more, than that anyone could expect. Hey, folks, wake up! ORM supposed to make life easier, not harder!.. Therefore, if ORM concept does not makes your life any easier but generates a mess of general hodgepodge, maybe quite correct logical conclusion would be to do not use it at all?
Legacy databases solves legacy problems. We need new databases and new approach to the data management. Thus having it simple and understandable: keep sets away from objects.
Moral: Keep it simple, stupid.