diff --git a/core/src/main/java/org/hibernate/engine/jdbc/BlobProxy.java b/core/src/main/java/org/hibernate/engine/jdbc/BlobProxy.java index 579efa0262..92530a11b8 100644 --- a/core/src/main/java/org/hibernate/engine/jdbc/BlobProxy.java +++ b/core/src/main/java/org/hibernate/engine/jdbc/BlobProxy.java @@ -104,6 +104,15 @@ public class BlobProxy implements InvocationHandler { stream.close(); return null; } + if ( "toString".equals( method.getName() ) ) { + return this.toString(); + } + if ( "equals".equals( method.getName() ) ) { + return Boolean.valueOf( proxy == args[0] ); + } + if ( "hashCode".equals( method.getName() ) ) { + return new Integer( this.hashCode() ); + } throw new UnsupportedOperationException( "Blob may not be manipulated from creating session" ); } diff --git a/core/src/main/java/org/hibernate/engine/jdbc/ClobProxy.java b/core/src/main/java/org/hibernate/engine/jdbc/ClobProxy.java index ecf888ba29..a4d5295e39 100644 --- a/core/src/main/java/org/hibernate/engine/jdbc/ClobProxy.java +++ b/core/src/main/java/org/hibernate/engine/jdbc/ClobProxy.java @@ -106,6 +106,15 @@ public class ClobProxy implements InvocationHandler { reader.close(); return null; } + if ( "toString".equals( method.getName() ) ) { + return this.toString(); + } + if ( "equals".equals( method.getName() ) ) { + return Boolean.valueOf( proxy == args[0] ); + } + if ( "hashCode".equals( method.getName() ) ) { + return new Integer( this.hashCode() ); + } throw new UnsupportedOperationException( "Clob may not be manipulated from creating session" ); }