AttributeOverride « Annotation « JPA Q&A





1. what is AttributeOverride annotation used for in Hibernate    stackoverflow.com

@Entity
class User {
@EmbeddedId
@AttributeOverride(name="firstName", column=@Column(name="fld_firstname")
UserId id;
Integer age;
}
@Embeddable
class UserId implements Serializable {
String firstName;
String lastName;
}
I want to know what is the use of AttributeOverride. This is the code from hibernate online docs