Hi All
I'm using hibernate 3.1.2 and annotations 3.1 beta 8.
I'm stuck trying to figure out haw to map a Map of core types e.g.
public Map<String,String> getMyData();
As I understand it, the EJB3 annotations don't support mapping of core types, so I'm not surprised that @OneToMany fails.
According to
http://www.hibernate.org/hib_docs/annot ... e/#d0e2065 the hibernate extensions do support collections of core types, using @CollectionOfElements.
I can't make this work for a Map rather than a Set. Is @CollectionOfElements supported for Maps and if so, please could someone provide an example? Right now I'm getting an error ('A Map must declare a @MapKey element') but I can't figure out how to get round it. Adding a @MapKey element is tricky when their is no name to map to!
Thanks
Jonathan.