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.
|