Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
2.1.6
Name and version of the database you are using:
Oracle 8i
I am running into a peculiar problem in using Hibernate and store procedure. Any help is greatly appreciated. Here is my situation:
I have a stored procedure that performs an set of functions that creates a transaction in the database. The customer code is one of the parameters that is passed to the stored procedure.
My Java code inserts a customer and a guarantor in the database, after establishing a Hibernate session. No commit is performed here. Then the stored procedure is called by passing the customer id, as required. In this situation, the stored procedure is not able to find the customer record that is inserted.
However, if I insert only a customer (not the guarantor) and then call the stored procedure, the stored procedure is able to find the customer record.
Both the customer and guarantor is saved in the same table (unfortunately, we are inserting into a database created by a third party and we do not have a say to create a seperate table for guarantors).
I am not sure why I am not able to find the record if I insert two records, where as I can find it when I insert only one record.
Any light on this problem is greatly appreciated.
Thanks