0

I have a column in my table that is mapped like this in my Hibernate JPA model object:

@Generated(GenerationTime.INSERT)
@Column(name = "column", nullable = false, unique = false, insertable = true, updatable = false)
private Long column;

While most of the times I want the DB to generate the value for me, there are certain times where I want to assign a value to this column manually. Is this possible?

I tried to give a value to the column from the setter method, however this is being overwritten on insert.

Thanks in advance for your time.

is-serp
  • 171
  • 1
  • 9

0 Answers0