#1471 closed enhancement (fixed)
Implement equals() and hashCode() in all QueryElement implementations
Reported by: | Nicklas Nordborg | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | major | Milestone: | BASE 2.16 |
Component: | core | Version: | |
Keywords: | Cc: |
Description
This is a feature that would be useful since we then don't have to compare Expressions using their string representations. The comparison is needed in the BFS exporter when used from the external program executor to make it possible to check if a given expression has already been added to the export. Right now, we check this by calling Expression.toString() and comparing the result, but it would be better if expressions implemented equals() instead.
Change History (4)
comment:1 by , 15 years ago
Milestone: | → BASE 2.16 |
---|
comment:2 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:4 by , 15 years ago
(In [5321]) References #1471: Implement equals() and hashCode() in all QueryElement implementations
Ouch! It turned out that the IdentitySet
I used in AbstractQuery
was not a java.util class. It was an internal Hibernate implementation with some peculiar issues (eg. ClassCastException). Since there is no Set implementation using object identity I used the Map implementation instead.
(In [5320]) Fixes #1471: Implement equals() and hashCode() in all QueryElement implementations