Hibernate version: 3.1beta3, annotations 3.1beta5
Name and version of the database you are using: MySql 4.11
I would expect there are several ways of accomplishing this, but I haven't been able to find a way to persist an untyped Map with Hibernate/annotations.
What additional annotations would I need to add to this class to be able to persist it?
Code:
@Entity
public class ConfigTest {
private Map<Serializable, Serializable> items;
public Map<Serializable, Serializable> getItems() { return items; }
public void setItems(Map<Serializable, Serializable> items) { this.items = items; }
public Serializable getItem(Serializable key) { return items.get(key); }
}
I'll keep rummaging the various forums, but would appreciate a pointer.
- S