I would like to map 3 tables, each of which are represented by entities: pageflow, role, and document.
there is db table that joins the 3 with the primary key of that table being the keys of the other 3: pageflow_id, role_id, and document_id
For a particular document and role, I can have any number of pageflows. The same pageflows can be associated with any number of documents.
the result I want is on the document entity to have a method: public Map<Role, List<Pageflow>> getPageFlows ();
Is this even possible? If so, what would the annotations look like to map this?
|