Hi there,
I request your help for what seems to be a quite simple problem:
I need to store a 128 bits hash value (16 Bytes) as a primary key into my database via Hibernate. How could I do that ?
I first thought I use the hibernate "
binary" type, but since it's mapped to a "
tinyblob", I get (under MySQL 4.1) the following error :
Code:
Unsuccessful: create table feature (idFeature tinyblob not null, featureName varchar(255) not null, primary key (idFeature)) type=InnoDB
BLOB/TEXT column 'idFeature' used in key specification without a key length
Is it a way to make hibernate create for me a "
binary(16)" instead of an "
tinyblob", so I could use it as my primary key ?
I tried without success to specified the length of the BLOB:
Code:
<id name="id" type="binary" length="16" column="idFeature">
(by the way, I use an Hibernate v3.0)
Thanks in advance for your help,