-->
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: Many association for a table - Join like?
PostPosted: Thu Jan 28, 2010 4:55 am 
Newbie

Joined: Thu Jan 28, 2010 4:36 am
Posts: 1
Hello,
I'm new to hibernate and I need to modify a web application for a client. It is a voice recording system using hibernate annotation.

The solution has a class call Segment mapped to the table with the same name in the DB.
This class is associated to another table called Tape and so the @Id annotation for Segment is set to the variable Id.

Now what I want to do is to associate the class Segment to the Class Map.
Map is also a table in the DB and has 2 columns, localparty and username.
I'd like to map the column localparty to the column localparty from Segment table (or class if you talk variables).
And all that without foreign keys on Map or changing the table Segment.

Is it possible, and if so, how can I do that?

EDIT:
A Segment could be mapped to many username in Map through Localparty
A username in Map could be mapped to many Segment through Localparty

Localparty are Strings.


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.