java - Mapping a complex Map in JPA -


i can't obtain persistence entity has field this:

private map<string, list<string>> filtervaluerange; 

i've tried far:

@elementcollection     @jointable(name="attribute_value_range", joincolumns=@joincolumn(name="id"))     @mapkeycolumn (name="filter_id")     @column(name="filter")     private map<string, list<string>> filtervaluerange; 

but seems there still missing.

can point me right direction?

i'm using jpa interface, there's hibernate under hood.

thanks!

mapping nested collection relationship not supported jpa can overcome changing object model little, example:

@onetomany(mappedby = "parent") @mapkeycolumn (name="filter_id") private map<string, valuerange> filtervaluerange; 

and in corresponding valuerange entity:

@manytoone private parent parent; 

alternatively may take @ following post:


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -