From: <leg...@at...> - 2003-12-10 07:25:17
|
The following comment has been added to this issue: Author: Gavin King Created: Wed, 10 Dec 2003 1:23 AM Body: This occurs because you call a method from the constructor, causing proxy initialization, and then re-initializing the value after Hibernate sets it. I've asked the CGLIB guys if there is a change in how enhanced objects are initialized. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-535 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-535 Summary: 2.1 rc1 CGLIB2 Proxy Problems. Type: Bug Status: Open Priority: Major Project: Hibernate2 Versions: 2.1 rc1 Assignee: Gavin King Reporter: Konstantin Sharenkov Created: Tue, 9 Dec 2003 11:49 PM Updated: Wed, 10 Dec 2003 1:23 AM Environment: WinXP tomcat 4.1.27, jdk 1.4.1, Description: After i moved to 2.1 RC1 form 2.1 beta 3 i have following issue if class is lazy <class .... lazy="true"> and I obtain instance obj = sess.load( XXX.class, ID ) if instance is proxy 1. obj.getId() always returns 0 2. getter for other persistent obj.getPersistent() always returns null 3. getter for persistent enum obj.getEnum() always return value for constant Enum.fromInt(0) if i set lazy="false" ol works correct if i use previous verison library all correct too. the sample for id and Persistent Enum included see User.getType, User.getId() and Screenshoots --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |