Which one of the pairs of classes below correctly achieves this task?

The developer wants to define a unidirectional relationship from the customer entity to the order entity and map this relationship using a foreign key mapping strategy.
Which one of the pairs of classes below correctly achieves this task?
A. @Entity public class Customer {@Id int customerId;@OneToMany @JoinColumn (name = "CUST_ID") Set <Order> orders;. . .}@Entity public class order {@Id int orderId;. . .}
B. @Entity public class Customer {@Id int customerId;@OneToMany Set <Order> orders;. . .}@Entity@JoinColumn (names = "CUST-ID", referencedColumnName = "customerId")public class order {@Id int order Id;. . .}
C. @Entity public class Customer {@Id int customerId;@OneToMany (JoinColumn = @joinColumn (name = "CUST_ID") Set <Order> orders;. . .} @Entity public class order {@Id int orderId;. . .}
D. @ Entity public class Customer {@Id int customerId;@OneToMany (JoinColumn = @JoinColumn (name = "CUST_ID"), table = ""ORDER) Set <Order> orders;. . .}@Entity public class order {@Id int orderId;. . .}

Download Printable PDF. VALID exam to help you PASS.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.