i need to assign the value of the map to my entity but jpa tries to save the hole object as an byte array.
@Entity
public class ImageSet {
...
@ElementCollection
private Map<Integer, Image> images = new LinkedHashMap<>();
}
@Entity
public class Image {
...
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
}
I think it is not that hard but i cant find any examples online. Could you please help me? thank you very much!