The following entity has non id column COLUMN_NONID. This column is populated from database sequence called in trigger(before insert on table)
@Entity
@Table(name="tableABC")
public class ABCClass implements Serializable {
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name="COLUMN_ID")
private Long columnId;
-----
-----
@Column(name="COLUMN_NONID")
private Long nonIdColumn;
----
}
When I tried to insert new record in this table. The object abcClassEnity returned from save contain nonIdColumn value as null. This column value exists in database and it is defined as not null column. How I can retrieve this column value from save.
abcClassEnity = tableABCRepository.save(abcClassEnity);