I'm trying to persist an entity that contains a Map of <Enum,String>:
Code:
@CollectionOfElements(fetch=FetchType.EAGER)
public Map<MyEnum, String> getStats() {
return stats;
}
..and would like the mapkey to be stored as a String or worse case as Ordinal. By default it stores it as raw (bytea in Postgres for example):
Code:
Resulting 'stats' table:
game_code varchar
element varchar
mapkey bytea
I can not seem to find any indication on how to do accomplish this. From some of the posts I read it seems extremely convoluted or even impossible. Am I missing something?
Thanks,
Martijn
Hibernate: 3.3.2