I have a simple Java class which represents a real-life entity I have to store, such as this.
@Data
public class MappingValue {
private String feature;
private String value;
}
Now, I want to store several of these mappings as a list in a different entity. This entity is stored in a SQL table, and I want to store these mappings as a list of jsonb
objects. I did something like this, but I can't seem to get it to work.
@Column(name = "specifications", columnDefinition = "jsonb")
private List<MappingValue> specifications;
Any ideas? Thanks in advance.