-->
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: Load data from junction-table in a many-to-many relationship
PostPosted: Thu Mar 18, 2004 8:00 pm 
Newbie

Joined: Thu Feb 26, 2004 10:05 pm
Posts: 15
Hi all,

I understand that you can use <composite-element> to map table's column from the join-table to either ends of the many-to-many relationship. But approach will only give either end entity a one-to-many relationship to the components that contains data collected from the join-tables. What I really want is to have properties of one ends of the many-to-many relationship, to be automatically load from the join-table given the opposite end of the relationship. For example,

A(x,y,z)*<-->*B => A<-*AB(x,y,z)*->B

so if 'a' is an instant of A, and 'b' is an instant of B. And a<-->b are links, i.e. associated, then I want a's properties to be automatically loaded

e.g. A.x==AB.x; A.y==AB.y; A.z==AB.z given instant of A and B are associated.

A real world implication is, having a Code entity that has many-to-many relationship with Dictionary entity. Code has id and image properties, where image is being store in the join-table. So if instance of Code is assinged with an instance of Dictionary, then automatically the image property of Code will be load from the associated row and column that reflex the instance of Code and Dictionary association, i.e. or assignment.

Thanks in advance for any help or ideas,

--danny


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 19, 2004 7:10 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
don't crosspost

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 19, 2004 12:51 pm 
Newbie

Joined: Thu Feb 26, 2004 10:05 pm
Posts: 15
emmanuel wrote:
don't crosspost


Sorry all,

I posted this question a day ago, and it doesn't seem like there is anyone viewing. That's why I did what I did.

Sorry!!!

--danny


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.