Hello everyone,
I’ve got an error persisting data in Oracle12c database.
This is my table with only one column defined as identity:
CREATE TABLE rv_numeric_id
(
numeric_id NUMBER(19,0) GENERATED ALWAYS AS IDENTITY MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE NOKEEP NOSCALE NOT NULL ,
PRIMARY KEY (numeric_id)
);
the entity is defined correctly (IMO):
@Entity
@Data
@Table(name = "RV_NUMERIC_ID")
public class RvNumericIdSequence {
@Id
@Column(name = "NUMERIC_ID")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long numericId;
}
but when hibernate try to persist data get this error:
SQL Error: 936, SQLState: 42000
ORA-00936: missing expression
The problem is the query generated by the orm:
insert into rv_numeric_id values ( )
This query is not compliant with oracle sql syntax, it should be like this:
insert into rv_numeric_id values ( DEFAULT)
anyone have had the same problem?
Thanks