#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 Changed 13 years ago by
Milestone: | → BASE 2.16 |
---|
comment:2 Changed 13 years ago by
Owner: | changed from everyone to Nicklas Nordborg |
---|---|
Status: | new → assigned |
comment:3 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:4 Changed 13 years ago by
(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