-->
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: Composite-id Generator
PostPosted: Mon Sep 03, 2007 1:09 pm 
Newbie

Joined: Mon Sep 03, 2007 1:04 pm
Posts: 1
Hi,

I have the following snippet from a hibernate xml file:

<composite-id name="id" class="AuftragstexteTId">
<key-property name="nr" type="int">
<column name="Nr" />
</key-property>
<key-property name="mandantId" type="int">
<column name="MandantID" />
</key-property>
</composite-id>

I want to create a generator on the "nr" field.

Any idea how?

10x in advance,
tAs


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 03, 2007 8:09 pm 
Beginner
Beginner

Joined: Tue Apr 25, 2006 10:46 am
Posts: 28
Hi,

I believe it's wiser to generate surrogate key and define
unique constraint on each property of original composite
keys.


Search the threads. There shud be many discussions
on these already.

Regards

Sam


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.