-->
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: how to map "this" collection?
PostPosted: Tue May 18, 2004 5:26 am 
Senior
Senior

Joined: Sun Mar 14, 2004 10:16 am
Posts: 129
Location: Ankara
hi all,
Suppose I have a scenario:

Table AMO --> ID,.......
Table AMOACO--> AMOID, ACOID ( both fk and together pk)
Table ACO--> ID,..........

Class AMO: Long ID, list acos ...
Class ACO: Long ID, ..........

1 AMO ---> * ACO

I wonder that how can I set this one-to-many relation in the mapping file just using the AMOACO table only as a bridge?

I mean in general collection of objects logic, there are 2 tables and 2 classes in the simpliest case, but now I have 2 classes with 3 tables, one of them is the mapper table that I want to use as bridge.

<bag name = "acos" lazy= "true" ... ??????
.... ????
<one-to-many class="ACO">
</bag>

I think I need some formulatic expression here in bag...

If possible, I want all thing to happen in the mapping file.

_________________
-developer


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 18, 2004 7:56 am 
Senior
Senior

Joined: Sun Mar 14, 2004 10:16 am
Posts: 129
Location: Ankara
hello???

_________________
-developer


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 18, 2004 10:01 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
This is a many-to-many relational model, map it this way

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 19, 2004 6:37 am 
Senior
Senior

Joined: Sun Mar 14, 2004 10:16 am
Posts: 129
Location: Ankara
Thanks,I respect hibernate, what to say more!

_________________
-developer


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 19, 2004 6:49 am 
Senior
Senior

Joined: Sun Mar 14, 2004 10:16 am
Posts: 129
Location: Ankara
and I discovered the great update performance of <idbag> .
Nearly "PHI" times better!
great work Hibernate!

_________________
-developer


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.