+2  A: 

It is possible to map a ManyToMany association using a Map, and a typicall use case for this kind of mapping is when you have a ternary association. For example, if you have:

STUDENT_TEACHER_COURSE
STUDENT_ID(FK, PK)
TEACHER_ID(FK, PK)
COURSE_ID (FK, PK)

Then you could define the following mapping (assuming you're using a Hibernate Annotations < 3.5):

@Entity
public class Student {
    ...
    @ManyToMany
    @JoinTable(
        name="STUDENT_TEACHER_COURSE", 
        joinColumns= { @JoinColumn(name="STUDENT_ID") },
        inverseJoinColumns= { @JoinColumn(name="TEACHER_ID") }
    )
    @MapKeyManyToMany(joinColumns = @JoinColumn(name="COURSE_ID",unique = false))
    protected Map<Course,Teacher> teachers ;
    ...
}

But I don't think you can have a "nested" List<Teacher> as value inside the Map, I don't think Hibernate can map that and I'd consider getting the List from an entity instead.

References

Resources

Pascal Thivent
@Arthur Thanks. Do you see/know any better approach? What the OP wants looks very exotic to me.
Pascal Thivent
@Pascal Thivent Your solution sounds good. But if he want an exotic mapping, he should use a lot of wrappers @Embeddable classes. I hope he provide some information about your approach.
Arthur Ronald F D Garcia
@Pascal Thivent When i said *A lot of relationships* i refer to the mapping provided by @Maddy.Shik :)
Arthur Ronald F D Garcia
@Pascal Thivent Thanks for solution. As u suggested approach i am following is little exotic and nested collection is also not possible with hibernate. You mentioned to use Entity instead of list, that is possible only if i use Class corresponding to mapping table which doesn't seem in accordance with coding principles. Can u please suggest your approach?
Maddy.Shik