Oracle
1Z0-860 · Question #189
The Java Persistence entity Lineltem defines a composite primary key that is defined by the two columns ORDERID and LINEITEMID in the database. Which two are true? (Choose two.
The correct answer is A. Line ltem must define a primary key class to represent the composite primary key. D. The semantics of the equals and hashCode methods of the primary key class must be consistent with. See the full explanation below for the reasoning.
Question
The Java Persistence entity Lineltem defines a composite primary key that is defined by the two columns ORDERID and LINEITEMID in the database. Which two are true? (Choose two.
Options
- ALine ltem must define a primary key class to represent the composite primary key.
- BThe composite primary key is mapped as two fields in Lineltem. No extra primary key class is
- CThe combination of〦mbedded and @Embeddable annotations can be used to denote the composite
- DThe semantics of the equals and hashCode methods of the primary key class must be consistent with
How the community answered
(55 responses)- A82% (45)
- B13% (7)
- C5% (3)
Community Discussion
No community discussion yet for this question.