Hi,
is it possible to map a Collection Map with a Embeddable:
Code:
@Entity(access = AccessType.FIELD)
public class TestMap {
@Column(name = "_id")
@Id(generate = GeneratorType.AUTO)
public long id;
@OneToMany(targetEntity = TestEntry.class)
@JoinTable(table = @Table(name = "TestMap"), joinColumns = {@JoinColumn(name = "_testId")})
@MapKey(name = "key")
public Map map;
}
@Embeddable
public class TestEntry {
public String key;
public String value;
}
This leads to a "Associated class not found" exception. Is there another simple approach to map a java.util.Map ?
We use Annotation Version 3.1beta6 and hibernate 3.1rc1
armin