Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.1
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
Description
When using @LazyLoading, object-creation is indeed deferred. however it is not cached, and a new object is always created with a call to List.get(). At a minimum, this behavior surprised me.
The "under the hood" PDF implies object-creation only occurs once.
The actual object will only be loaded from the BitBuffer right after you call an operation on that proxy for the first time.
This quirk is of particular impact when there is non-bound data on the object which may be lost.
I considered whether something like a WeakHashMap might be useful, but I think in most cases people are expecting a "strong" reference level with a list, such as in the following example: