Generate equals method should access attributes via accessor not directly.

The way it is done now will cause a problem with Hibernate proxies.

1 comment
Comment actions Permalink

You can easily workaround this with Refactor -> Encapsulate Fields refactoring (checkbox "Use accessors even when field is visible" must be checked).

Although,  "Use accessors when available" checkbox for generating hashCode and equals would be really nice.


Please sign in to leave a comment.