The environment:
Database - Oracle 12c
Hibernate - 5.2.10Final
JPA - version 2.0
We are using entityManager.merge to insert the object. The value of the sequence is a positive value but when inserted in db, it becomes negative. Can't seem to find the cause of this.
Here is the hibernate setting we have for our entity object id attribute field, with the sequence setting
@Id
@SequenceGenerator(name = "someSequence", sequenceName = "SOME_SEQUENCE")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "someSequence")
@Column(name = "RECORD_ID", unique = true, nullable = false, precision = 10, scale = 0)
private String recordId;
anyone can help? thanks.