I am trying to insert in a oracle view using JPA. JPA generates below SQL statement-
insert into home_view (id, email, first_name, last_name) values (default, ?, ?, ?)
And when it executes query, Oracle DB throws below error-
ORA-32575: Explicit column default is not supported for modifying views
As per my understanding above query can not work with view because we can not insert into a view if its underlying table column is IDENTITY column.
Do we have any option in hibernate which helps exclusion of identity column while saving object to DB?
Note- I do not want to use raw SQL statement to insert my object.
I used GenerationType.SEQUENCE strategy and it is working fine, but only problem is I have to provide sequence name. I do not want to provide hard coded sequence name in Java Entity.
Thanks for your help!