[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3409) ResultTransformers need smarter equals() and hashCode() impls
Manuel Dominguez Sarmiento (JIRA)
noreply at atlassian.com
Wed Sep 3 19:33:38 EDT 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31070#action_31070 ]
Manuel Dominguez Sarmiento commented on HHH-3409:
-------------------------------------------------
On further analysis, given that QueryKey precalculates its own hash code on construction, and uses the customResultTransformer's hashCode as part of the calculation, the only feasible solution is to have a stable hashCode() implementation for all ResultTransformer implementations. The current design inherits hashCode() from Object, and since the resulting hash is a function of the object's memory address, there is no way hash codes will ever match in different JVMs.
> ResultTransformers need smarter equals() and hashCode() impls
> -------------------------------------------------------------
>
> Key: HHH-3409
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3409
> Project: Hibernate3
> Issue Type: Bug
> Components: query-criteria, query-hql
> Affects Versions: 3.2.6, 3.3.0.CR1
> Reporter: Steve Ebersole
> Assignee: Steve Ebersole
> Fix For: 3.2.x, 3.3.0.CR2
>
>
> Specifically, we need to account for the possibility of distributed query caching considering that the ResultTransformer is part of the cached query key.
--
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list