Which one of the following fields of the Customer entity accomplishes this task?

The developer is creating a Java Persistence model for a legacy database. The database contains customer and subscriptions.
The subscriptions table has a foreign key to the Customer table, a foreign key to the magazines table, and a column that stores a java.util.Date (the subscription expiration date).
The developer wants to create entities Customer and subscription to model these tables and to represent the relationship between customer and subscription as a java.util.Map.
Which one of the following fields of the Customer entity accomplishes this task?
A. @OneToMany@joinColumn (name = "Customer – FK")Map <Magzine, Data> subscriptions;
B. @ElementCollectionMap <Magzine, Data> subscriptions
C. @OneToMany@JoinTable (name = "Subscriptions")Map <Magzine, Data> subscriptions;
D. @ElementCollection@CollectionTable (name = "subscriptions")Map <Magazine, Data> subscriptions
E. @ElementCollection@CollectionTable (Name = "Subscriptions")@Temporal (TemporalType.DATE)Map<magazine, date> subscriptions

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.