Question 1 / 22:  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
<< First < Previous Flashcard Next > Last >>
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

Quiz Home Page
Ask
Madison Christian
Start Exam
Edgar Delgado
Start Test
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>