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: Postgres Stored Procedures
PostPosted: Tue Dec 16, 2008 12:21 pm 
Newbie

Joined: Tue Dec 16, 2008 12:13 pm
Posts: 1
Hi,

I am trying to called a Postgres stored procedure from Hibernate. The problem is that when the stored procedure is called, it doesn't return a ResultSet object. I actually get back a PGobject.

I'm not sure what my stored procedure should actually be returning. At the moment I have

Code:
CREATE OR REPLACE FUNCTION isValid(accountNo integer)
  RETURNS integer AS


My mapping file says

Code:
<sql-query name="isValid" callable="true">
   <return-scalar column="result" type="integer"/>
   {? = call isValid(:accountNo)}
</sql-query>


I'm guessing that to get a result set back I should be have the return type of my stored procedure as an integer, but what should it be?

Thanks
Graham


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.