Oracle
1Z0-860 · Question #45
1Z0-860 Question #45: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-860 to reveal the answer and full explanation for question #45. The question stem and answer options stay visible for context.
Question
Given two entities with a many-to-many bidirectional association between them: 11. @Entity public class Employee! 12. Collection projects; 13. // more code here 14.} and 11.〦ntity public class Project! 12. Set<Employee> emps; 13. // more code here 14.} What set of annotations correctly defines the association?
Options
- A@ManyToMany on the projects field, @ManyToMany(mappedBy="projects") on the emps field
- B@ManyToMany(mappedBy="emps") on the projects field, @ManyToMany on the emps field
- C@ManyToMany(targetEntity=Project.class) on the projects field, @ManyToMany(mappedBy="projects")
- D@ManyToMany(targetEntity=Project.class) on the projects field, @ManyToMany on the emps field
Unlock 1Z0-860 to see the answer
You've previewed enough free 1Z0-860 questions. Unlock 1Z0-860 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.