-->
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.  [ 2 posts ] 
Author Message
 Post subject: Creating binary varchar column in MySQL portably?
PostPosted: Wed Jun 16, 2004 3:14 pm 
Newbie

Joined: Thu May 06, 2004 8:14 pm
Posts: 18
MySQL has a "nice" feature where all varchar searches are case-insensitive. I have a column which is a Base64 encoded key which I want to store as a String but need to perform case-insensitive searches on. In mysql you can create a column as "varchar(X) binary" and MySQL will perform all queries on that column as case-sensitive.

The problem is that we are using two different types of databases: mysql in development and DB2 for production so any solution needs to be portable. I can use a sql-type attribute of "varchar(X) binary" but that won't work on DB2 (at least I assume it won't work?). Ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 16, 2004 3:35 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
You are using SchemaExport I suppose? You could create your own extension of MySQLDialect and override the registered column type for varchar (look at the mysldialect). Anyways, using SchemaExport on Production Databases is questionable at best.


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

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.