Beginner |
 |
Joined: Thu Nov 03, 2005 4:11 pm Posts: 25
|
I have chosen to write most of my queries using HQL. But I have now come to a point where I am doing performance tuning and I just discovered that when you write queries in HQL it ignores the fetch mode specified in your class mappings. I really don't understand the reasoning behind this.
This creates a huge inconsistency issue. I like knowing that all my queries are interpreted by hibernate and made consistent per my mapping files.
If this is being provided as a means of flexibility then I think it should be an option that can be turned off/on per query or for all the hql. Is this an option?
Maybe I am misinterpreting this. Could someone explain the reasoning to me? IMO this creates a huge difference between using criteria queries and hql. However in the documentation it seems to indicate that hql and criteria queries are just alternatives, essentially a preference from the users' perspective. But with the fetch mode discrepancy it really isn't just a preference it is a completely different way of doing things.
|
|