How can I map a Map in JPA?
I try the following mapping:
@ManyToMany
public Map<User, String> rsvp;
But I get the following errors:
A JPA error occurred (Unable to build EntityManagerFactory): Use of @OneToMany or @ManyToMany targeting an unmapped class: models.Event.rsvp[java.lang.String]
Thanks!
I second what DataNucleus said.
Maybe this can help you to refactor your code:
http://en.wikibooks.org/wiki/Java_Persistence/Relationships#Nested_Collections.2C_Maps_and_Matrices