-->
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.  [ 1 post ] 
Author Message
 Post subject: Association mapping
PostPosted: Sun Aug 16, 2009 4:52 am 
Newbie

Joined: Thu Aug 13, 2009 1:23 am
Posts: 3
Location: Israel
I have the following scenario:

Table A:
id (primary)
activityid (not officially primary but still is unique)

Table B:
....
activityid

activityid in B is a foreign key.

class A has an association of B's (one to many).
but when i try to create a one-to-many collection from A to B (in A.hbm), i can only specify the foreign key in B, and NHibernate automatically makes a join using the primary of A which is 'id', with the specified foreign key of B.
that's no good for me...

can i do it differently with out changing the DB?

Thanks :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.