Hi,
I'm having a problem using <columnDefinition="MEDIUMBLOB"> on hibernate 3.2.5 where it does not define the field-type correctly.
Here is an example:
class MyClass
{
...
@Lob @Column(columnDefinition="MEDIUMBLOB")
public void setData(byte[] data) {
this.data = data;
}
...
}
When I run this class, the MySql-field has the type TINYBLOB.
sniplet from MySql-Console:
<...
Server version: 5.0.45-community-nt MySQL Community Edition (GPL)
...
mysql> desc tablename;
+--------------+------------+------+-----+---------+-------------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+------------+------+-----+---------+-------------------+
| id | bigint(20) | NO | PRI | NULL | auto_increment |
| data | tinyblob | YES | | NULL | |
| vacancy_id | bigint(20) | YES | MUL | NULL | |
+--------------+-------------+------+-----+---------+------------------+
3 rows in set (0.00 sec)
>
I can define what ever I want, the result is always a TINYBLOB.
Any ideas? Thank you!
|