In MySQL it is
possible to specify index length, which may be shorter than the length of the underlying column(s). This is because MyISAM index width is limited to 1000 bytes, and because indexing long strings is in general slow.
How can I express the following DDL using Hibernate annotations?
Code:
CREATE TABLE IF NOT EXISTS `cache_content` (
`cid` varchar(2000) NOT NULL,
`content` longblob,
PRIMARY KEY (`cid`(100))
) ENGINE=MyISAM;
Notice: PRIMARY KEY (`cid`
(100)). This specifies that I want to use the first 100 characters of the 2000-long varchar in my index.
Thanks!