Hello.
i`m trying to map a attribute that is a Map using jpa annotation.
With hibernate i map like this:
<class name="User" table="user"> ... <map name="rights" table="user_rights" lazy="false" cascade="all" order-by="entity_id asc" > <key column="user_id"/> <index column="entity_id" type="string"/> <element column="rights" type="string"/> </map> .... </class>
@Entity
public class User implements Serializable {
...
@JoinTable(name = "user_rights",
joinColumns = { @JoinColumn(name = "user_id") } )
@MapKey(name="entity_id")
private Map<String, String> rights;
...