Hibernate XML Mapping: Lazy False or Fetch Select?
问题 I have a simple question. I found this Hibernate config on our project: <many-to-one name="employee" class="com.myapp.Employee" cascade="merge" lazy="false" fetch="select"> <column name="employee_id" sql-type="bigint" not-null="true"/> </many-to-one> Doesn't fetch="select" mean "Lazy load all the collections and entities" based on Fetching Strategies. But by writing lazy="false" mean do not lazy load. So the config above says: "Disable lazy loading. Enable lazy loading." In effect, this means