I have a technical problem with the lazy loading of Hibernate in combination with a many-to-one mapping. In my domain model i have the following class Person private PersonType type;
My mapping looks like this <many-to-one name="type" column="..." class="....PersonType" lazy="no-proxy"/>
So as you can see, i don't want PersonType retrieved from the db if i load a Person. But this doesn't work.
In the mapping of PersonType looks like this <hibernate-mapping default-cascade="none" default-lazy="false"> <class name="....PersonType" table="..."> if i remove the default-lazy=false, the type of the person is not retrieved, but this is a problem for me because a load of PersonType does not retrieve the properties of this object and this i want hibernate to load the properties of PersonType in this case. Is there a solution for this case ?
Thanx for helping me
|