Force « Load « JPA Q&A





1. Force eager loading of otherwise lazy loaded properties    stackoverflow.com

I've got a Hibernate object which's properties are all loaded lazy. Most of these properties are other Hibernate objects or PersistentSets. Now I want to force Hibernate to eager load these properties ...

2. For lazy relationship how to specify a fetch join that can force a eager loading in JPA?    stackoverflow.com

@Entity
public EntityA implements Serializable {
    ...
    @OneToOne(fetch=FetchType.LAZY)
    private EntityB b;
    ...
}
How do i dynamically load the EntityB eagerly?

3. Force many to one without loading - no matter what?    forum.hibernate.org

Wow... that is a harsh statement. Hibernate is not perfect. Its architecture forces you to break object oriented rules from time to time in order to improve performance. Here, in my opinion, is a classic example of such a situation: Code: public class Account { private String id; private String region; ...

4. Force a lazily loaded field to load with hql    forum.hibernate.org

5. Force Property Load    forum.hibernate.org