nerdexam
Oracle

1Z0-860 · Question #242

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. Lineltem 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

  • ALineltem 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

(59 responses)
  • A
    76% (45)
  • B
    15% (9)
  • C
    8% (5)

Community Discussion

No community discussion yet for this question.

Full 1Z0-860 Practice