From 0d007bce7ca0448110a903ccad30b52c924af698 Mon Sep 17 00:00:00 2001 From: Gail Badner Date: Fri, 21 Oct 2011 14:21:19 -0700 Subject: [PATCH] HHH-6758 : Test failure due to Oracle restrictions on Blob comparison and missing equals() and hashCode() --- .../test/annotations/entity/Country.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/hibernate-core/src/matrix/java/org/hibernate/test/annotations/entity/Country.java b/hibernate-core/src/matrix/java/org/hibernate/test/annotations/entity/Country.java index 5aa5e9bf87..f338e58bc9 100644 --- a/hibernate-core/src/matrix/java/org/hibernate/test/annotations/entity/Country.java +++ b/hibernate-core/src/matrix/java/org/hibernate/test/annotations/entity/Country.java @@ -17,4 +17,27 @@ public class Country implements Serializable { public void setName(String name) { this.name = name; } + + @Override + public boolean equals(Object o) { + if ( this == o ) { + return true; + } + if ( o == null || getClass() != o.getClass() ) { + return false; + } + + Country country = (Country) o; + + if ( name != null ? !name.equals( country.name ) : country.name != null ) { + return false; + } + + return true; + } + + @Override + public int hashCode() { + return name != null ? name.hashCode() : 0; + } }