in our project is requirement to use for each db operation stored procedures and assign identifiers from sequences (oracle).
we use id generator of type "sequence" and for the insert we defined custom statement - call of the stored procedure.
but problem is, that each save process requires two calls to the database:
1. sequence.nextval
2. call of stored procedure
it is possible to encapsulate call of nextval inside of the stored procedure and stored procedure will assign appropriate id.
question is, if this strategy is supported by default in Hibernate.
Thanks
|