[hibernate-issues] [Hibernate-JIRA] Commented: (HSHARDS-51) ShardResolutionStrategyImpl needs equals() and hashCode()

Max Ross (JIRA) noreply at atlassian.com
Tue Sep 16 11:53:05 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HSHARDS-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31205#action_31205 ] 

Max Ross commented on HSHARDS-51:
---------------------------------

I'm ok with how equals() is currently implemented, but thanks for bringing it up.

There are certainly cases where it makes sense to treat 2 objects as equal even though they are not instances of the same class, but I don't think this is one of them.  A persistent entity is uniquely identified by its name and its id, so I'm not sure why someone would need to extend this class.  Maybe we should just make the class final?  We're still in beta so I'm okay with this, and if anyone hollers at least we'll learn about their use case.  What do you think?

> ShardResolutionStrategyImpl needs equals() and hashCode()
> ---------------------------------------------------------
>
>                 Key: HSHARDS-51
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSHARDS-51
>             Project: Hibernate Shards
>          Issue Type: Bug
>          Components: engine
>            Reporter: Max Ross
>            Assignee: Max Ross
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> There's basically no way to implement a cache-aware ShardResolutionStrategy until we implement equals() and hashCode() on ShardResolutionStrategyImpl.

-- 
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