-->
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: Can I define a unique key on more than one column?
PostPosted: Thu Jul 27, 2006 7:20 am 
Newbie

Joined: Thu Mar 09, 2006 5:48 am
Posts: 10
Hibernate version:
3.2

In case I want to make a constraint on a column to make it unique
I will do:
Code:
@Entity
public class Temp {

private String member;

@Column(unique=true)
public String getMember(){

}

}


what I need to do in order to make a composition of more than one column to unique key?[/quote]


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 28, 2006 2:20 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
@TAble(uniqueConstraint)

_________________
Emmanuel


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.