views:

1761

answers:

4

How can I map a Map in JPA without using Hibernate's classes?

Thanks in advance.

+2  A: 

Does not the following work for you?

@ManyToMany(cascade = CascadeType.ALL)
Map<String,EntityType> entitytMap = new HashMap<String, EntityType>();
Chris Kaminski
I'm a little confused. The question was about mapping a Map<String, String>, but the "best answer" is about a Map<String, EntityType>. Do i miss something?
Willi
EntityType could be any entity type, including a String.
Chris Kaminski
A: 

Perhaps following links are interesting:

marabol
A: 
marabol
A: 
marabol