Hibernate version: tried with 3.1.3 and 3.2.4.sp1
Name and version of the database you are using: Derby 10.2.2.0
I am using field access for all my properties (access="field").
I am using an assigned value for my identifier (access="field").
Here's what I discovered:
1) My pojo class has been enhanced to include a CGLIBLazyInitializer. No problem.
2) Normal getters/setters have been modified to redirect the request to a target object held by the CGLIBLazyInitializer. Again, no problem.
3) My identifier method is not redirected to the target held by the CGLIBLazyInitializer. Instead, it accesses the identifier value on the proxy (byte enhanced pojo) which is null. This is a problem.
4) I've overriden equals and hashCode. My equals method is failing because it accesses the field value directly (byte enhanced pojo) which is null although the target object holds the correct value. This is a problem.
The symptoms aren't that widespread since my code doesn't encounter too many proxies. But when it shows up, it shows up big.
Anybody have a clue as to why I'm seeing this as a problem?
Thanks in advance,
Glenn
|