-->
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: How to make multiple properties unique for joined-class
PostPosted: Tue Apr 26, 2005 1:37 am 
Beginner
Beginner

Joined: Thu Feb 26, 2004 6:59 am
Posts: 47
Location: Gurgaon, India
Hibernate version:3.0
Name and version of the database you are using:MS SQL Server 7.0


Top
 Profile  
 
 Post subject: Unique alternate key for multiple columns in a joined subcla
PostPosted: Thu May 05, 2005 2:44 am 
Beginner
Beginner

Joined: Thu Feb 26, 2004 6:59 am
Posts: 47
Location: Gurgaon, India
Hello,

I want to define a unique constraint for one of my object on more than one fields.

Like, data object is

Person extends Basic Object
First Name
Last Name
Age
Address

Now I want that First Name and Last Name should be unique.

I am using <properties> tag for this in the mapping.

<joined-subclass name='person' extends='basicObject'>
<key column='basicobject_id'>
<properties unique='true'>
<property name='firstname'>
<property name='lastname'>
<properties>
<joined class>

But properties tag is not supported for the joined subclasses.

Please suggest what should I do for applying this unique constraint.

Thanks,
Mohit.


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.