Valid 1Z0-898 Dumps shared by ExamDiscuss.com for Helping Passing 1Z0-898 Exam! ExamDiscuss.com now offer the newest 1Z0-898 exam dumps, the ExamDiscuss.com 1Z0-898 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com 1Z0-898 dumps with Test Engine here:
The developer wants to override the default mappings for an embeddable class Address used by the customer entity. The Address class is defined as follows: @Embeddable public class Address ( private String street; private String city; private String country; .. . ) Assume that NO mapping descriptor is present. Which code segment below shows the correct way to override the default mapping for address?
Correct Answer: D
Explanation/Reference: * Annotation Type Embedded Defines a persistent field or property of an entity whose value is an instance of an embeddable class. Here we have @Embedded Address addr; * AttributeOverrides is used to override mappings of multiple properties or fields. Example: @Embedded @AttributeOverrides({ @AttributeOverride(name="startDate", column=@Column(" EMP_START")), @AttributeOverride(name="endDate", column=@Column("EMP_END")) }) public EmploymentPeriod getEmploymentPeriod() { ... } Reference: javax.persistence, Annotation Type AttributeOverrides http://docs.oracle.com/javaee/5/api/javax/persistence/AttributeOverrides.html Incorrect: not C: Must use column = @Column