Issue
I would like to have fields: creationDate
and updateDate
in Entity
,
I would like to this fields to be updated in db on persist
operation.
But I would like to field creationDate
will not be updated on merge
operation in db.
I am looking for JPA annotation like this:
@TransientOnMerge
or @IgnoreOnMerge
But cant find anything.
Is it possible? Can You help?
Solution
you can add @Column(updatable=false) to the field of the entity.
Answered By - PWC