I have a model (object) that contains few embeddable objects inside.
Few of the embeddable object have List<String>
inside them. When I mark the List<Embeddable-object> @ElemenetCollection
, from outside there is an issue about the string list inside.
Error : Could not determine type for: java.util.List, at table: data_room_groups, for columns: [org.hibernate.mapping.Column(images)]
Here is my entity:
private String phone;
private Star_certificate star_certificate;
@Embedded
private List<PolicyStruct> policy_struct;
private String postal_code;
@ElementCollection
private List<RoomGroup> room_groups;
@AttributeOverrides({ @AttributeOverride(name = "id", column = @Column(name = "R_ID")),
@AttributeOverride(name = "name", column = @Column(name = "R_NAME")) })
@Embedded
private Region region;
Room Group :
private int room_group_id;
private List<String> images;
private String name;
private List<String> room_amenities;
@Embedded
private RgExt rg_ext;
private NameStruct name_struct;
Does anyone know what is the problem here? I also tried to mark the list outside as embedded and inside the list of strings as element collection , but it doesn't create the tables.