In our application, we need to have fields that are assignable only once.
At first we thought of encapsulating the fields and making the setters private. However, some q
Try
@Column(updatable = false)
And make your setter private. (Leave your getter public if you want)
I think this is the best practice.
P.S.: JPA uses field access if you annotate your fields and uses getter/setter access if you annotate your getter method.