[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6758) Test failure due to Oracle restrictions on Blob comparison and missing equals() and hashcode()
Gail Badner (JIRA)
noreply at atlassian.com
Fri Oct 21 17:18:19 EDT 2011
Test failure due to Oracle restrictions on Blob comparison and missing equals() and hashcode()
-----------------------------------------------------------------------------------------------
Key: HHH-6758
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6758
Project: Hibernate Core
Issue Type: Bug
Components: testsuite
Affects Versions: 4.0.0.CR4
Reporter: Gail Badner
Assignee: Gail Badner
Fix For: 4.0.0.next
The following test fails because Oracle requires Blob comparisons to be done using dbms_lob.compare():
org.hibernate.test.annotations.entity.BasicHibernateAnnotationsTest.testSerialized()
In the following, Forest_near.near is a blob column:
delete from Forest_near where Forest_id=? and near=?
When executed, it fails with: ORA-00932: inconsistent datatypes: expected - got BLOB
Oracle requires the comparison be done as follows:
delete from Forest_near where Forest_id=? and dbms_lob.compare( near, ? ) == 0
This delete statement was being executed for collection elements of an unchanged collection because the Serializable class did not implement equals() or hashCode().
Adding equals() and hashCode() avoids executing these delete statements.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list