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

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -