Hi,
I'm using Hibernate 2.1.6 and I have a problem with joins. I have a mapping where an entity "A" has:
- a one-to-one relationship with the entity "B"
- a one-to-one relationship with the entity "C"
When using the hql question "from A", to list all A entities, there is a lot of sql selects generated, I think it's two selects for every A entity. Obviously this is not good from a performance view so my question is if there is another way to write this query to retrieve the relations in just one single join which is easily done with a native sql query? I tried to use proxies setting the class attribute "lazy" to true for B and C but that doesn't help.
I have read the documents about join fetch but I can't get it to wrok. Can someone please help me here and provide me with an example?
Thanks in advance
/B
|