I want to add a mapping as
Map<String, Person> personMap;
inside an entity class, where Person
is the entity. The Map
is to identify the exact Person
corresponding to the String
(let it be a nickname of that person). The same person may have different names and whenever any of the names is given, the same Person
has to be found.
Persistance API used is JPA and the provider is EclipseLink. What annotation should I use and how?