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 Contact Information embeddable class contains address information as well as a reference to a phone entity. The ContactInformation class is defined as follows: @Embeddable public class ContactInformation { String street; String city; @OneToOne Phone phone; } The developer wants to use this class in an Employee entity, but override the default name of the foreign key to the Phone entity. Which of the code segments shows how to do this correctly?
Correct Answer: A
Explanation/Reference: Example: Example 2: Overriding the mapping for phoneNumbers defined in the ContactInfo class @Entity public class Employee { @Id int id; @AssociationOverride( name="phoneNumbers", joinTable=@JoinTable( name="EMPPHONES", joinColumns=@JoinColumn(name="EMP"), inverseJoinColumns=@JoinColumn(name="PHONE") ) ) @Embedded ContactInfo contactInfo; ... } Reference: javax.persistence, Annotation Type AssociationOverride http://docs.oracle.com/javaee/6/api/javax/persistence/AssociationOverride.html