How to set read-only columns in Hibernate?
问题 I don't know how to force read-only columns in Hibernate. I would like to set idgroup as read only column. Even if I set insertable=false and updatable=false , in the hibernate SQL I can read: Hibernate: insert into groups (description, name, account_idaccount, idgroup) values (?, ?, ?, ?) but I would like to obtain: insert into groups (description, name, account_idaccount) values (?, ?, ?) Here are my classes: @Entity @Table(name = "groups") public class Group implements java.io.Serializable