Multiple choice technology programming languages

How can a whole class be mapped as immutable?

  1. By using the mutable="false" attribute in the class mapping.

  2. By using the ismutable="false" attribute in the class mapping.

  3. By using the ismutable="no" attribute in the class mapping

  4. None

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

A Hibernate class mapping can be marked as immutable using mutable="false" attribute. This tells Hibernate that instances of this class never change, allowing optimizations. Options B and C use incorrect attribute names - the correct attribute is 'mutable', not 'ismutable'.