I have a CollectionOfElements where the elements are properly stored as a Map. The key and value of the map are Embedded objects of the same type. I cannot figure out how to rename the columns used for my embedded types for just the key or just the value. So I always end up with repeated column errors. Below is my latest attempt. The attribute overrides and column specifications on MapKey seemed to be ignored. Is there any way to do this with annotations?
Thanks!
Code:
@CollectionOfElements
@MapKey(columns={@Column(name="src_row"),@Column(name="src_column")})
@Column
@AttributeOverrides({
@AttributeOverride(name="array_column", column=@Column(name="dst_column"))
})
public Map<ArrayPosition,ArrayPosition> getMapping()
{
return this.mapping;
}