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
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
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
|