Hi!
In a Collection of Embeddables is there a way to use AttributeOverride?
Something like this:
Code:
@CollectionOfElements
@JoinTable(name="PHONE_TABLE",
joinColumns = { @JoinColumn(name="ID_PERSON" ) })
@AttributeOverrides( {
@AttributeOverride(name="phoneCountry",column=@Column(name="CO_PHONECOUNTRY") ),
@AttributeOverride(name="phoneArea", column=@Column(name="CO_PHONEAREA") ),
@AttributeOverride(name="phoneNumber", column=@Column(name="CO_PHONENUMBER", length = 10) )
} )
private Set<Phone> phones = new TreeSet<Phone>();
I tried this way, but it is not working. My generated PHONE_TABLE has the columns named ID_PERSON, phoneCountry, phoneArea and phoneNumber instead of ID_PERSON, CO_PHONECOUNTRY, CO_PHONEAREA and CO_PHONENUMBER.