ON UPDATE CURRENT_TIMESTAMP and JPA

You can mark the variables as update or creation timestamps in your entity. In the following example you can see how this can be done very easily using hibernate annotations:

@UpdateTimestamp
private LocalDateTime editTimestamp;

@CreationTimestamp
private LocalDateTime creationTimestamp;

Just for the reference and to make sure there is no confusion, I am using the following package imports for the respective datatypes and annotations:

import org.hibernate.annotations.CreationTimestamp
import org.hibernate.annotations.UpdateTimestamp
import java.time.LocalDateTime

You need to change the column annotation to include updatable = false. This will cause the edit_timestamp column to not show up in the update SQL, so the JPA provider won't include the current value of the field which is what is causing it to override the default.

@Temporal(TemporalType.TIMESTAMP)
@Column(name = "edit_timestamp", 
        updatable = false,
        columnDefinition="TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
private Date editTimestamp;