getter « Load « JPA Q&A





1. When does Hibernate call setters other than when loading?    stackoverflow.com

I know Hibernate calls setters when you lookup a bean. But I recently noticed the setter was being called by Hibernate when we we were not doing any lookups. We had ...

2. Problems with Lazy Loading - Lazy Getters Return Nulls    forum.hibernate.org

We are using Hibernate3 with JPA Annotations and have defined many of our associations as LAZY. Much of the time, LAZY associations work as expected; we load the class and when we call the getter for the association object, the correct object is returned. However, for a number of associations we are seeing unpredictable behavior; we fetch a collection of parent ...

3. Private Getters/Setters w/ Field Access & Lazy Loading    forum.hibernate.org

public class Parent { @OneToMany(mappedBy="parent") private Set children = new HashSet(); public Set getChildren() { return Collections.unmodifiableSet(children); } public void addChild(Child obj) { children.add(obj); } public void removeChild(Child obj) { children.remove(obj); } } public class Child { ...