-->
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.  [ 3 posts ] 
Author Message
 Post subject: Primary foreign keys
PostPosted: Sun Feb 08, 2004 4:15 pm 
Beginner
Beginner

Joined: Sun Feb 08, 2004 4:09 pm
Posts: 46
Hi ppl!


I'm a little bit confused on how to declare foreign keys as primary, the column shouldn't use any generator (cause the value has been generated in another table)? And what about the <many-to-one> declarations?! Cause if the the key is already declared as primary, should I declare a <many-to-one> too? (with the same name?)...

Help me out! =)

Cya!
Thiago Souza


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 08, 2004 4:50 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Just take a look at the foreign generator. It allows you to automatically assign the value of a property of the related class to your identifier (only usefull for one-to-one).

I don't get what you mean by the second part of your question. Please be more precise.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 08, 2004 4:59 pm 
Beginner
Beginner

Joined: Sun Feb 08, 2004 4:09 pm
Posts: 46
Hi!

Got it! I understood everything when I saw the foreign parameter =)


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