Multiple choice technology programming languages

28 ____ forces hibernate to bypass the setter method and access the instance variable directly while initializing a newly loaded object.

  1. a) By mapping the property with access="onlyfield" in Hibernate metadata

  2. b) By mapping the property with access="variable" in Hibernate metadata

  3. c) By mapping the property with access="field" in Hibernate metadata

  4. d) none of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In Hibernate, mapping a property with access="field" tells Hibernate to bypass the setter method and access the instance variable directly using reflection. This is useful when you have non-trivial setter logic that shouldn't execute during object loading. The 'variable' and 'onlyfield' values are not valid access strategies.