Expert |
|
Joined: Wed Mar 03, 2004 6:35 am Posts: 1240 Location: Lund, Sweden
|
If you don't specify a value for lazy it defaults to lazy="proxy". This means when you call getSomeObject() you will actually get a proxy object that will only be initialized once you call some method on it.
If you specify lazy="no-proxy" and has done the required "byte-code instrumentation", Hibernate will load and initialize the SomeObject when you call getSomeObject(). Personally I have never used the no-proxy option and I can't find any good reasons for using it. As the Hibernate documentation says: "it is only for marketing purposes".
|
|