Is there any way of embedding comments in HQL code that I am missing? It would be a very nice feature as I'm using some fairly large queries to generate reports, and without inline documentation they'll look a bit intimidating to the next programmer who has to deal with them. As with so many queries they are comprised of simple blocks, but when seen as an uncommented whole its difficult to visualise how they break down, even with gratuitous use of whitespace.
Also, in the same vein, is there any HQL equivalent, or plans to implement a pre-compilation mechanism for queries, in a similar vein to a PreparedStatement in JDBC? It would be nice to be able to avoid the overhead of having Hibernate recompile a query every time its used, if I know it is not going to change.
I've found no reference, although I suppose its possible there is already a compilation cache tied to the HQL String passed in.
|