tags:

views:

373

answers:

0

I was having a performance issue with a query Hibernate was creating due to too many fields being added from multiple joins. Hibernate seems to add all fields from joined tables to the select portion and I haven't figured out how to get it not to without property projections. So I switch the query (using Criteria object) to use property projections for all the fields in the model and then used aliasToBean to get it to populate my object. That helped in the speed of the query but I've now run into a problem where a map association I have is not getting loaded lazily. How do I tell Hibernate to load that map when I'm using a projections for my fields? I have other many-to-one associations that load correctly, but the map seems to get left out. I'm running hibernate 3.2.6.