I am working on a Java EE project using Netbeans. I automatically created JPA entities and controllers using the database.
I want to update the database by adding more tables or updating existing ones. The problem I am facing is that I need to regenerate all JPA entities and controllers that I don't want, since most of my objects are modified to include
insertable = false, updatable = false
in @Column where the database uses current_timestamp . If I regenerate them, I will have to change all entities again by including insertable = false, updatable = false .
This is what I am trying to achieve after creation.
@Column(name = "CREATED_ON", insertable = false, updatable = false) @Temporal(TemporalType.TIMESTAMP) private Date createdOn;
source share