Objects returned from Session.load() appear to be lazy-loading proxies. This is problematic for me as Hibernate does not even check that the returned object exists (until a property of the object is accessed). Is it possible to disable this behavior at the application level, without also disabling all the collection and association lazy-loading (which is less problematic because failures are less likely)? I'm aware that I could replace all calls to Session.load with Session.get and do an explicit null check, but I'm wondering if there is another way...
|