For example, i have 3 tables:
Man: int pk_id
Junction: int fk_m_id, int fk_w_id, String some_info Object Man, Object Woman
Woman: int pk_id
The junction table has Man and Woman's foreign keys as attributes, but it also has Man and Woman objects inside it and also some extra information, so there is no need for m_id and w_id foreign key attributes, because the id's are already inside the objects. How can i remove the id attributes and only have the objects inside it and make hibernate aware that the foreign keys are inside the objects? The junction table also exists in db and has some extra attributes (String some_info), so can't do it with many-to-many..or can I?
Hope this makes sense.