Oracle Sequence in hibernate

Hi,

Is there an option to Omit/skip identity column in hibernate mappings?
Because i have created a trigger which uses the identity column and generates at the back end while inserting records into the db.

I need it only when i edit and delete the records.
Currently what its doing is creating a new sequence value for edit and save option

Title :BezKoders Tut#35
Desc :Tuts#35
Levels :6
Published :0
[2m2025-06-21 21:28:05.346[0;39m [32mDEBUG[0;39m [35m15600[0;39m [2m---[0;39m [2m[nio-8080-exec-3][0;39m [36mo.s.orm.jpa.JpaTransactionManager       [0;39m [2m:[0;39m Found thread-bound EntityManager [SessionImpl(642883809<open>)] for JPA transaction
[2m2025-06-21 21:28:05.346[0;39m [32mDEBUG[0;39m [35m15600[0;39m [2m---[0;39m [2m[nio-8080-exec-3][0;39m [36mo.s.orm.jpa.JpaTransactionManager       [0;39m [2m:[0;39m Creating new transaction with name [org.springframework.data.jpa.repository.support.SimpleJpaRepository.save]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
[2m2025-06-21 21:28:05.349[0;39m [32mDEBUG[0;39m [35m15600[0;39m [2m---[0;39m [2m[nio-8080-exec-3][0;39m [36mo.s.orm.jpa.JpaTransactionManager       [0;39m [2m:[0;39m Exposing JPA transaction as JDBC [org.springframework.orm.jpa.vendor.HibernateJpaDialect$HibernateConnectionHandle@55b1f3d3]
***Hibernate: call next value for tutorial_id_seq --> while edit and save***
[2m2025-06-21 21:28:05.353[0;39m [33m WARN[0;39m [35m15600[0;39m [2m---[0;39m [2m[nio-8080-exec-3][0;39m [36mo.h.engine.jdbc.spi.SqlExceptionHelper  [0;39m [2m:[0;39m SQL Error: 6576, SQLState: 65000
[2m2025-06-21 21:28:05.354[0;39m [31mERROR[0;39m [35m15600[0;39m [2m---[0;39m [2m[nio-8080-exec-3][0;39m [36mo.h.engine.jdbc.spi.SqlExceptionHelper  [0;39m [2m:[0;39m ORA-06576: not a valid function or procedure name
``


Its doing this for the insert stmt.


Title :BezKoder Tut#35
Desc :Tut#35
Levels :2
Published :0
[2m2025-06-21 21:39:15.947[0;39m [32mDEBUG[0;39m [35m15600[0;39m [2m---[0;39m [2m[nio-8080-exec-1][0;39m [36mo.s.orm.jpa.JpaTransactionManager       [0;39m [2m:[0;39m Found thread-bound EntityManager [SessionImpl(1471771415<open>)] for JPA transaction
[2m2025-06-21 21:39:15.947[0;39m [32mDEBUG[0;39m [35m15600[0;39m [2m---[0;39m [2m[nio-8080-exec-1][0;39m [36mo.s.orm.jpa.JpaTransactionManager       [0;39m [2m:[0;39m Creating new transaction with name [org.springframework.data.jpa.repository.support.SimpleJpaRepository.save]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
[2m2025-06-21 21:39:15.949[0;39m [32mDEBUG[0;39m [35m15600[0;39m [2m---[0;39m [2m[nio-8080-exec-1][0;39m [36mo.s.orm.jpa.JpaTransactionManager       [0;39m [2m:[0;39m Exposing JPA transaction as JDBC [org.springframework.orm.jpa.vendor.HibernateJpaDialect$HibernateConnectionHandle@1a759357]
**Hibernate: call next value for tutorial_id_seq  -->  while inserting**
[2m2025-06-21 21:39:15.956[0;39m [33m WARN[0;39m [35m15600[0;39m [2m---[0;39m [2m[nio-8080-exec-1][0;39m [36mo.h.engine.jdbc.spi.SqlExceptionHelper  [0;39m [2m:[0;39m SQL Error: 6576, SQLState: 65000
[2m2025-06-21 21:39:15.956[0;39m [31mERROR[0;39m [35m15600[0;39m [2m---[0;39m [2m[nio-8080-exec-1][0;39m [36mo.h.engine.jdbc.spi.SqlExceptionHelper  [0;39m [2m:[0;39m ORA-06576: not a valid function or procedure name

I don’t know what your code is doing, but if Hibernate ORM acquires a new sequence value, then it must assume that the entity does not exist in the database.
Please post the code that you’re executing.

I found the solution in another site.

Given below is the suggestion if you use in a oracle db with a trigger for inserting the sequence automatically.

@Id @GeneratedValue(generator = "incrementor") @GenericGenerator(name = incrementor", strategy = "increment")

and it solved the problem.