Hi,
I am looking for a way to annotate a CollectionOfElements of type Map<String, String> so that the value column of the Map is created by Hibernate as a @Lob or @Clob
my current code which works fine in handling the Map but creates a table "additional_data" with column "value" as VARCHAR, while I need a CLOB:
Code:
@Entity
public class MyObject{
// .. id annotations here..
public Long id;
@CollectionOfElements(fetch=FetchType.EAGER)
@JoinTable(name="additional_data",
joinColumns = @JoinColumn(name="id"))
@MapKey(columns={@Column(name="name")})
@Column(name="value")
public Map<String, String> getAdditionalData() {
return this.additionalData;
}
}
I have tried different "positions" for the @Lob annotation but I cannot find something which works, searching through the forum I found no hint.
Thanks
Francesco