-->
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.  [ 3 posts ] 
Author Message
 Post subject: How to create a case insensitive unique index
PostPosted: Thu Dec 02, 2004 8:20 pm 
Regular
Regular

Joined: Wed Jun 30, 2004 4:02 pm
Posts: 64
Hibernate version:
2.1.6

Mapping documents:
------------------------ Feature Attribute Class --------------------------

/**
* @hibernate.property column="NAME"
* @hibernate.column name="NAME" not-null="true" length="60" unique-key="NAME_FEATURE_ALT_KEY"
*/
public String getName() {
return super.getName();
}

/**
* @hibernate.many-to-one column="FEATURE_ID" not-null="true" cascade="none"
* @hibernate.column name="FEATURE_ID" not-null="true" unique-key="NAME_FEATURE_ALT_KEY"
*/
public Feature getFeature() {
return this.feature;
}

----------------------------------- LookupObject class -----------------------
/**
* @hibernate.property column="NAME" length="60" not-null="true" unique="true"
*/
public String getName() {
return this.name;
}

------------------------------------------

I need to index a String column, so the unique index should be case insensitive, or a function based index.

I'd like to do this for the single column, or composite index.

With @hibernate.property unique="true" or @hibernate.column unique-key="blah" I don't see how I could tell it to use the upper function in the ddl generated from hbm2ddl.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 30, 2004 7:30 pm 
Regular
Regular

Joined: Wed Jun 30, 2004 4:02 pm
Posts: 64
Are there no responses because this is in the wrong forum, because it is a duplicate question, or because it cannot be done? If it cannot be done, are there any plans to support this in the future?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 31, 2004 4:29 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
it's not supported (and there are no current plans/jiras for it)

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.