-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate inserts and stored procedures
PostPosted: Thu May 05, 2005 5:33 pm 
Newbie

Joined: Wed Sep 17, 2003 9:02 pm
Posts: 13
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.