-->
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.  [ 5 posts ] 
Author Message
 Post subject: Unique constraints with discriminator columns?
PostPosted: Fri Feb 20, 2004 7:32 am 
Newbie

Joined: Wed Jan 21, 2004 8:43 am
Posts: 5
I use hibernate 2.1.1

How can I create unique constraints which include discriminator columns?
It's simple enough to link properties together with

@hibernate.column unique-key="something"

But there's no unique-key attribute for descriminator columns?
I've considered creating getter/setter methods for the discriminator
columns, but I'm worried this will mess things up.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 20, 2004 12:55 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Code:
<discriminator>
<column name="column" unique-key="name"/>
</discriminator>


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 23, 2004 4:25 am 
Newbie

Joined: Wed Jan 21, 2004 8:43 am
Posts: 5
That seems simple enough. I guess my beef is with xdoclet and not hibernate.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 23, 2004 7:52 am 
Newbie

Joined: Wed Jan 21, 2004 8:43 am
Posts: 5
A newer version of xdoclet allows @hibernate.discriminator to have a unique-key attribute. Problem solved.


Top
 Profile  
 
 Post subject: unique-key attr on @hibernate.discriminator tag in XDoclet
PostPosted: Tue Nov 01, 2005 3:20 pm 
Newbie

Joined: Wed Oct 19, 2005 10:06 am
Posts: 3
rothron wrote:
A newer version of xdoclet allows @hibernate.discriminator to have a unique-key attribute. Problem solved.


What version of XDoclet are you talking about? I've downloaded all versions back to 12/2003 and I don't see any with the "unique-key" attribute on the @hibernate.discriminator tag.

Is this supported?


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