Bug 189 : Autoboxing on primitive Id's can have issues with persistence context management
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.3.0
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
03/12/2009
Updated 
03/12/2009
Type 
Bug
 
Attachments 
No attachments

If you use primitive types for your Id's (int, long etc) ... then these beans can be removed from the persistence context.

This issue is to do with autoboxing creating Object instances as keys - and these keys are not referenced by any other object - specifically the beans that they relate to.

 
Rob 03 Dec 08:00
Fixed in HEAD

The fix was to change the persistence context to use a WeakValueMap taking the reference to the id out of the issue.

woResponse

Upload a file