This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
i prepare my self of OCE-JPA certification , in PRO JPA 2 book chapter 5 , explain the Map<> use in OneToMany relationship between Entities . when i try to insert the element in Map<String ,String> there is fowling exception throw. . please explain the exception and explain how to use Map<> in relationship , with small example.
You should have to use @ElementCollection for Map<String,String>.
If the Map value is Entity, then use @OneToMany or @ManyToMany.
If the Map value is basic type or Embedded type, then use @ElementCollection.