With JPA annoations, I want to reuse same embedded object like this :
@Entity
public class User {
@Embedded
public Address homeAddress;
@Embedded
public Address workAddress;
}
@Embeddable
public class Address {
public String code;
public String city;
...
}
I can specify SQL column names with @AttributeOverrides, @AttributeOverride and @Column, but it's verbos. Is it possible to specify just a prefix to add to each column for homeAddress and workAddress ?
Thanks,
Xavier