I'm relatively new to hibernate and am in the process on trying to ramp up to fill the void left by someone else leaving an existent project. I've been searching the forums and documents to try to help me with what I believe to be a relatively simple problem. Unfortunately I'm not able to find an answer, but I've seen a couple threads of people asking the same question on various forums (including this one) without reply.
It would be a great help to me if somebody could point me in the right direction to try to figure out the problem I am having.
I get the following errors in my schema export when I run it....
[schemaexport] SEVERE: Unsuccessful: create index cpmParamValueIdx on ClobPropMap (paramValue)
[schemaexport] SEVERE: BLOB/TEXT column 'paramValue' used in key specification without a key length
My hibernate XML file defines the that variable as follows:
<map name="clobProps" table="ClobPropMap" lazy="false" cascade="all">
<key column="objectId" />
<map-key column="paramName" type="string" />
<element type="text" length="10000">
<column name="paramValue" index="cpmParamValueIdx" />
</element>
</map>
Hibernate is wrapping MySQL at the moment, but I hoping to use it to wrap other things in the future. The only solution I've seen is here:
http://forum.hibernate.org/viewtopic.ph ... key+length but this solution is less than desirable as it is MySQL specific and very inelegant, doing a regex find-replace on a generated file to add CLOB/BLOB specific typing.
Can anyone point me in the right direction for how to define CLOB/BLOB fields in Hibernate? What is the correct syntax for using type="text" with a length field?
Matt