What is the proper way to make an Entity read-only with JPA ? I wish my database table to never be modified at all programmatically.
I think I understand that I sho
A solution is to use field based annotation, to declare your fields as protected and to propose only public getter. Doing so, your objects can not be altered.
protected
(This solution is not entity specific, it is just a way to build immutable objects)