[hibernate-dev] Adding fetch joins to HQL queries programatically
Ali H. Ibrahim
aibrahim at cs.utexas.edu
Fri Feb 29 11:37:35 EST 2008
Hi,
I would like to be able to extend the functionality of
org.hibernate.Query in two ways:
1. Have a method on Query that returns the result aliases and their
position in the resulting object array. I think this information is
already available at the QueryImpl level, but just not exposed through
the public Query interface. Right now, if you do not use the
AliasToMapResultTransformer this information cannot be accessed.
2. Being able to add fetch joins programmatically for a given alias.
This is possible through straight hacking of the Hibernate code (I found
the cleanest place to add the fetch join was in QueryLoader, but it
could be done at the AST level too). I would like to do able to do this
without resorting hacking Hibernate directly, but instead through a
public API or extension point. Of course I could parse the HQL directly,
but that is very ugly.
Both of these points are already available in Criteria.
Regards,
Ali Ibrahim
Autofetch: http://www.cs.utexas.edu/~aibrahim/autofetch
More information about the hibernate-dev
mailing list