I have the following (stripped down) entity:
I'm trying to figure out how to annotate the values Map. I've tried CollectionOfElements but that only seems to work if both key and value are non-entity objects like
String, Integer, etc. I'm going that elsewhere and it works fine. I also tried a @OneToMany with an @MapKey however, the key in my case is not the target entity property.
Note also that StoredReportScheduleMetricValue is an Entity as well and has its own set of properties that need to be persisted.
The reason I am using a Map instead of a list is because I can't guarantee order so indexed properties won't work correctly when the data is loaded back up.
Any help is appreciated.