-->
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 define unique columns
PostPosted: Thu Nov 13, 2003 4:21 pm 
Pro
Pro

Joined: Wed Oct 08, 2003 10:31 am
Posts: 247
I have a column that needs to be UNIQUE.
Can I define this in the mapping file?


Top
 Profile  
 
 Post subject: Unique using hbgen
PostPosted: Thu Nov 13, 2003 4:34 pm 
Newbie

Joined: Mon Oct 20, 2003 12:18 pm
Posts: 12
Location: Mexico
If you are doing your mapping with xDoclet you can use next:
/**
* @hibernate.property column="message"
* not-null="false"
* unique="true"
* @return
*/


Top
 Profile  
 
 Post subject: Re: Unique using hbgen
PostPosted: Thu Nov 13, 2003 4:42 pm 
Pro
Pro

Joined: Wed Oct 08, 2003 10:31 am
Posts: 247
roychav wrote:
If you are doing your mapping with xDoclet you can use next:
/**
* @hibernate.property column="message"
* not-null="false"
* unique="true"
* @return
*/


Thanks for the tip.
I'm not using XDoclet. I've found what I was looking for a minute ago.


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.