Hi,
I have a simple bidirectional parent <-> child mapping where
parent has a one-to-many mapped set of children and child has a many-to-one mapping for its parent. (Hibernate 3, everything lazy)
If I do a child.getParent().getId() hibernate executes a loading query for the parent. To my understanding this load should not happen. I expect a proxy from getParent() and the proxy is able to execute getId without going to the database because the id of parent is part of the child database row.
Any ideas why this does not work as I expect it to?
|