From: <leg...@at...> - 2003-11-27 15:24:42
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-505 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-505 Summary: Allow proxy not to initialize object on hashCode/equals Type: New Feature Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.1 Assignee: Reporter: Dmitry Created: Thu, 27 Nov 2003 9:23 AM Updated: Thu, 27 Nov 2003 9:23 AM Description: There should be a way to tell Hibernate what although class A implements hashCode() and equals(), Hibernate should not initialize proxy for this class when these methods are called. This allows creation of classes with simple hashCode/equals which operate on Id property only. Currently such an objects get initialized when equals() is called resulting in inefficient operations with collections of proxied objects. One of the way of doing this would be addition of proxy-equals and proxy-hashcode attributes to <class> mapping element with following values: "true" - proxy handles hashCode()/equals() by itself (using Id property) "false" - proxy doesn't handle hashCode()/equals() but calls target's method WITHOUT initializing the object. "auto" - default. Do exactly what proxy does now - if objects doesn't override hashCode()/equals(), proxy handles these methods. Otherwise, object is initialized when one of these methods get called. Note: when proxy-equals="true", proxy must set target's Id property before calling it's equals() method. --------------------------------------------------------------------- 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 |