• Card 2 / 18: Which of the following statements about the fetch modes in Entity beans is FALSE?
    A) There are two fetch modes : EAGER and LAZY
    B) The default fetching mode for a field in an Entity bean annotated by @Basic is LAZY
    C) The default fetching mode for a field in an Entity bean annotated by @OneToMany is LAZY
    D) @Lob annotation does not have a default fetch mode

    Answer:
    B) The default fetching mode for a field in an Entity bean annotated by @Basic is LAZY

  • Keyboard Shortcuts

    Previous Card ← Previous Card Button
    Next Card → Next Card Button
    Flip Card Space-Bar
<< First < Previous Next > Last >>

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now
Explanation:

The default fetching mode for a field in an Entity bean annotated by @Basic is EAGER not LAZY. The same is true for @OneToOne and @ManyToOne annotations.

While @OneToMany and @ManyToMany (collection fields) have LAZY as a default fetch mode, which states that these fields (normally big size) can only be loaded when needed and accessed, which increases performance.

@Lob annotation does not have a default fetch mode, therefore to state one, you can follow @Lob with @Basic(fetch=LAZY) or by simply @Basic for EAGER fetch

Hide Choices Interactive Question Quiz Home Page
Flash Cards plugin by Curtis Blackwell github.com/curtisblackwell/flash_cards
Google Play and the Google Play logo are trademarks of Google Inc.
Ask
Vanessa Soledad
Start Exam
Copy and paste the following HTML code into your website or blog.
<iframe src="https://www.jobilize.com/embed/java-persistence-api-jpa" width="600" height="600" frameborder="0" marginwidth="0" marginheight="0" scrolling="yes" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>