-->
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: Discriminator inside multi-column unique constraint?
PostPosted: Tue Jan 30, 2007 4:30 pm 
Newbie

Joined: Mon Jun 26, 2006 4:38 am
Posts: 7
Location: Osijek, Croatia
I am using hibernate 3.1

The question is can discriminator be used inside multi-column unique constraint?
I know it can be used inside composite-id.
If it can be used in that way please how. I haven been able to find any solution in manual.
Many thanks.
Kruno.


Top
 Profile  
 
 Post subject: Re: Discriminator inside multi-column unique constraint?
PostPosted: Sun Feb 11, 2007 2:45 pm 
Newbie

Joined: Mon Jun 26, 2006 4:38 am
Posts: 7
Location: Osijek, Croatia
It can, just discriminator property inside multi-column unique constraint must have atribute insert="false" update="false"

example:
<discriminator column="tip" type="string" />
<properties name ="index" unique="true">
<many-to-one name="korisnik" class="orka.mkor.mapping.poduzeca.Korisnik" not-null="true"/>
<many-to-one name="dokument" not-null="true"/>
<property name="broj" />
<property name="godina"/>
<property name="tip" insert="false" update="false"/>
<many-to-one name="obracunskaJedinica"
class="orka.mkor.mapping.poduzeca.ObracunskaJedinica"
not-null="true"/>
</properties>


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.