nerdexam
Oracle

1Z0-860 · Question #276

Consider the following classes: 11.〦ntity Auction { 12. @ld int id; 13. @OneToOne Item item; 14.} 11.〦ntity Itemj 12. @ld int id; 13. @OneToOne (mappedBy="item") Auction auction; 14. } Given that…

The correct answer is C. The relationship is mappedtoaforeignkeyinthe AUCTIONtable. See the full explanation below for the reasoning.

Question

Consider the following classes: 11.〦ntity Auction { 12. @ld int id; 13. @OneToOne Item item; 14.} 11.〦ntity Itemj 12. @ld int id; 13. @OneToOne (mappedBy="item") Auction auction; 14. } Given that the Auction entity maps to an AUCTION database table and the Item entity maps to an ITEM database table, which statement is correct assuming there is NO mapping descriptor?

Options

  • AThe relationship is mapped to a foreign key in the ITEMtable.
  • BThe relationship is mapped usingajointableAUCTIONJTEM.
  • CThe relationship is mappedtoaforeignkeyinthe AUCTIONtable.
  • DThe relationshipis mapped to foreignkeysinbothITEMandAUCTION tables.

How the community answered

(41 responses)
  • A
    2% (1)
  • B
    5% (2)
  • C
    83% (34)
  • D
    10% (4)

Community Discussion

No community discussion yet for this question.

Full 1Z0-860 Practice