Skip to content

Commit a2779fa

Browse files
committed
HHH-19276 - Fix for issue
Signed-off-by: Jan Schatteman <[email protected]>
1 parent a7ac008 commit a2779fa

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

hibernate-core/src/main/java/org/hibernate/type/descriptor/java/EnumJavaType.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*/
55
package org.hibernate.type.descriptor.java;
66

7+
import java.util.Objects;
78
import java.util.Set;
89

910
import org.hibernate.boot.model.process.internal.EnumeratedValueConverter;
@@ -304,4 +305,21 @@ private <R> Set<R> valueSet(JdbcType jdbcType, BasicValueConverter<T,R> converte
304305
}
305306
}
306307
}
308+
309+
@Override
310+
public boolean equals(Object obj) {
311+
if ( obj == this ) {
312+
return true;
313+
}
314+
if ( obj == null || obj.getClass() != this.getClass() ) {
315+
return false;
316+
}
317+
var that = (EnumJavaType<T>) obj;
318+
return Objects.equals( this.getTypeName(), that.getTypeName() );
319+
}
320+
321+
@Override
322+
public int hashCode() {
323+
return this.getTypeName().hashCode();
324+
}
307325
}

0 commit comments

Comments
 (0)