Beginner |
|
Joined: Thu Jul 22, 2004 8:09 am Posts: 20
|
I want to map Oracle Blob to byte[], what should be the Code between sessionFactory.openSession() and session.close(): ?? Any help is appreciated.
Hibernate version:
2.1.7
Mapping documents:
<class
name="com.xxx.bean.Email"
table="EMAILS"
dynamic-update="true"
dynamic-insert="true"
>
<id
name="emailId"
type="long"
column="EMAIL_ID"
length="22"
>
<generator class="native"/>
</id>
<property
name="emailattachment"
column="EMAILATTACHMENT"
type="binary"
/>
private byte[] emailattachment;
public byte[] getEmailattachment() {
return this.emailattachment;
}
public void setEmailattachment(byte[] emailattachment) {
this.emailattachment = emailattachment;
}
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
Oracle 9
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
|
|