I gather hibernate can not load the endpoint of a nullable ToOne-Association lazily [1]. What is the preferred way to work around this limitation?
I am thinking of using a ToMany-Association instead, and encapsulate the set with single-valued @Transient accessors. Of course, this is rather ugly as people writing queries still have to be aware of the set, and have to use other property names than the public API exposes. Is there a better way?
---
[1] Because for To-One-Associations, the property is lazily loaded by installing a lazy loading proxy that pretends to be the entity, and no proxy can pretend to be null. See also
http://forum.hibernate.org/viewtopic.php?t=929127 and
http://www.hibernate.org/162.html