-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem with annotation
PostPosted: Mon Feb 18, 2008 7:12 am 
Newbie

Joined: Mon Feb 18, 2008 5:45 am
Posts: 5
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.