My Entity Class has id field and it using @Id
and it's strategy is null. Default Strategy is @GeneratedValue(strategy = GenerationType.AUTO))
.
when I call the JPA save method, it always invoke sql select before insert into ,query log is like bellow:
First Query:
Hibernate: select dataeviden0_.id as id1_0_0_, dataeviden0_.block_hash as block_ha2_0_0_ from table1 dataeviden0_ where dataeviden0_.id=?
Second Query:
Hibernate: insert into table1 (block_hash, id) values (?, ?)
I could control the id myself, I want the jpa ignore select before insert ,how to do ?