-->
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: Mapping file Indexing a TEXT or BLOB problem
PostPosted: Thu Dec 13, 2007 2:17 pm 
Newbie

Joined: Tue Aug 26, 2003 2:31 pm
Posts: 15
Location: San Diego, CA
If I create a column of type string of length, say, 5000. In MySQL's export, that will create a column of type TEXT.

In order to index a TEXT field in MySQL, you must specify a length in the create statement.

Is there a way to do this in a mapping file?

Here is what I have now:
Code:
<property name="synonymList" type="java.lang.String" column="SYNONYM_LIST" length="5000" index="ix_synlist1"></property>


And the Index creation is:
Code:
create index ix_synlist1 on MYTABLE (SYNONYM_LIST);


But what I need is:
Code:
create index ix_synlist1 on MYTABLE (SYNONYM_LIST(255));


Is that possible?[/code]


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.