-->
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: Problem with @UniqueConstraints on more than one column prob
PostPosted: Mon Dec 31, 2007 12:59 pm 
Newbie

Joined: Tue Jul 27, 2004 1:33 pm
Posts: 18
Location: South Africa
Hi all,

I am trying to set up a unique constraint on more than one column, But the hb2m2ddl script keeps on bombing:

@Table(uniqueConstraints=
{@UniqueConstraint(columnNames={"customer","run"})})

org.hibernate.AnnotationException: Unable to create unique key constraint (customer, run) on table Billing: customer not found

The column customer does exists. I am using MySQL. Any ideas?

thanks

_________________
http://www.jumpingbean.co.za
http://www.cyberconnect.co.za
http://www.ip-pbx.co.za
http://www.learndrupal.co.za


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 01, 2008 12:44 am 
Newbie

Joined: Tue Dec 18, 2007 9:15 am
Posts: 14
If you are using @Column annotation, defined name, try to use defined name insteed attribute name, can solve your issue.

_________________
-= DUNKELHEIT =-


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.