adspace


Which class elements are not persisted?

Answer Posted / Ashish Kumar Johri

In Hibernate, the following class elements are not persisted by default:
1. Transient variables - These are initialized only at runtime and their values are not stored in the database.
2. Static variables - These are shared among all instances of a class and their values are not specific to any object instance, hence they are not persisted.
3. Final variables - Once assigned, these variables cannot be changed during runtime. As such, final variables are initialized at compile-time and do not need to be stored in the database.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is latest hibernate version?

493