How to make an immutable class in hibernate?
Answer / Krishna Kumar
In Hibernate, you can make a class immutable by not providing any setter methods for the instance variables. Alternatively, you can use the JPA @Immutable annotation if your application is using JPA instead of Hibernate.
| Is This Answer Correct ? | 0 Yes | 0 No |
How to prevent dirty checking in hibernate?
Why do we need hibernate in java?
Mention some of the databases that hibernate supports?
What are the ways to access hibernate by using spring?
Is session a thread-safe object?
Why do we use inheritance mapping in hibernate?
How create hibernate cfg xml in eclipse?
What are the basic hibernate persistent annotations?
What are the steps of calling a stored procedure in hibernate?
What are native queries in hibernate?
What is the root element for the hibernate mapping file?
How to create two same tables in different schema’s by using single configuration file?