-->
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: Some one please help me...
PostPosted: Thu Dec 13, 2007 2:10 pm 
Newbie

Joined: Fri Dec 07, 2007 8:58 am
Posts: 8
Can some one please post the code and mapping files to be used for two tables in which primary key of one table is a foreign key for the other.I am finding it very hard to make a similar scenario work.If any one out there who have worked successfully please share the ideas.

Everything works for me but when a foreign key scenario appears nothing work in my program.Can some one please help me??


Two tables..

Table A :

COLUMNS

No (Integer) <-PK

Name (VARCHAR)

Table B:

COLUMNS

Rollno(TableA(No) <-FK

Atleast give me an idea how to go about the classes and the mapping files.

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 13, 2007 2:23 pm 
Newbie

Joined: Tue Aug 26, 2003 2:31 pm
Posts: 15
Location: San Diego, CA
I'd check this page out:

http://www.hibernate.org/hib_docs/nhibernate/html/mapping.html


Somewhere around 5.1.11 there is a section talking about primary key/foreign keys.


[/quote]


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.