-->
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.  [ 5 posts ] 
Author Message
 Post subject: many to many mapping table with exra columns
PostPosted: Fri Apr 20, 2007 11:13 am 
Newbie

Joined: Fri Apr 06, 2007 7:08 am
Posts: 4
as we know Person_Event table is join table for many-to-many mapping
it has only 2 columns Person_Id, Event_Id.

But Our project needs extra columns on a join table for many to many mapping , say the columns UPDATE_USER, UPDATE_TIME, (i.e when the row created, who created) info

how to make it

any help would be really appreciated


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 22, 2007 8:30 am 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
You won't use many-to-many anymore, but two one-to-many mapped to a central class that'll hold the additional property.

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 24, 2007 4:47 am 
Newbie

Joined: Fri Apr 06, 2007 7:08 am
Posts: 4
yes, that is the way the get it work, i tried and its working fine, anyway thanks dude


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 02, 2007 3:20 pm 
Newbie

Joined: Wed May 02, 2007 3:13 pm
Posts: 2
I got a problem with that kind of mapping.

My mapping are:

A - AB - B
|
C

In the join table i have a many-to-one association (C) and it's suppose to be lazy="true" but hibernate seems to ignoring the lazy and load the table anyway.

Any solution ?

Thank you

****
EDIT: Ok the C table is joined to table AB not to table A.
****


Last edited by ecoupal on Wed May 02, 2007 3:22 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed May 02, 2007 3:22 pm 
Expert
Expert

Joined: Tue Jul 11, 2006 10:21 am
Posts: 457
Location: Columbus, Ohio
1) post this in a new thread, you will not be able to rate answers unless you originate the thread

2) we would need to see your mapping files and retrieval code at a minimum


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