Could someone help me to set the proper way to override a column name in an extended entity.
Embedeable:
@Embedable
Email
@Column(name = "email_adress")
private string email;
Parent entity:
@Entity
AddressBook
@Embedded
@AttributeOverrides( {
@AttributeOverride(name="email", column = @Column(name="email_address") )
} )
private Email email
Extending entity:
@Entity
@AttributeOverrides( {
@AttributeOverride(name="email", column = @Column(name="home_email") )
} )
DeluxAddressBook extends AddressBook
@Embeded
@AttributeOverrides( {
@AttributeOverride(name="email", column = @Column(name="work_email") )
} )
private Email workEmail;
In the last entity I get workEmail mapped to "work_email" column which is OK, however home_email is mapped to column "email_address" defined originally in the embeddable. It should be mapped to a "home_email" column.
I tried w/o success:
@AttributeOverride(name="email.email", column = @Column(name="home_email") )
Thanks for your help, Jess