Related questions
JPA/Hibernate DDL generation; CHAR vs. VARCHAR
I have a JPA/Hibernate data model that I am using the Hibernate hbm2ddl tool to generate database DDL. I have some strings that should be CHAR and some that may be VARCHAR in the database. I want to …
How to exclude an entity field when doing an update with JPA
Is there a way to make a field non-persistent at update operation but persistent at create operation with JPA - Hibernate 4?
I tried it in this way
@Transient
@Id
@Column(name = "USER_NAME", nullable = false, length = 75)
private String userName;
but …