JPA - @OneToMany as a Map
In my case, it is worked with @OneToMany(cascade=CascadeType.PERSIST) @MapKeyColumn(name="COLUMN_NAME")
or
You can directly try with only @OneToMany(cascade=CascadeType.PERSIST)
Try using @MapKey(name = "locale")
instead.
@MapKeyJoinColumn
is used when your map key is an entity, but here you're just using the locale String.