hariharan jayaprakash wrote:how to make read only @Entity level..? Is there any annotations available to achieve it?
It seems there are no specific JPA annotations to achieve this. But some JPA providers have a custom annotation for this purpose (e.g. EclipseLink has the
@ReadOnly annotation).
But if the
@Entity is read-only, why not create an immutable class yourself and don't provide any set-methods?
Hope it helps!
Kind regards,
Roel