-->
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: Extra parameter on CRUD and query operations with JPA/Hibern
PostPosted: Mon Sep 10, 2007 5:12 am 
Newbie

Joined: Mon Sep 10, 2007 4:43 am
Posts: 1
Location: Madrid
Hibernate version: 3.2

Hello,

I'm trying to develop a complex application with JPA/Hibernate and oracle 10g. We are following a flip-flop strategy on the database with stored procedures that distinguish between flip or flop through a parameter. So I need to give the stored procedures the parameter that indicates between flip, flop or whatever.

I call the stored procedures in the mapping file as shown in this line:

<sql-insert callable="true" check="none">{call CONTROLADOR_DATOS.insertarSaldo(?,?,?,?,?,?,?,?,?,?,?)} </sql-insert>

JPA gets the Entities' attributes and parse them to the placeholders on the sql-insert sentence. The question is "how could I parse a parameter that is outside the Entityto the sql-insert sentence?" I don't see very clean to include it as a Supperclass' attribute although is something that works.

I'd like to include a parameter on the call to a stored procedure with NamedQueries, where Entity usage is not needed. Is there any way to do that with JPA/Hibernate. If not, I think it would be an interesting approach for next Hibernate release.

Thanks in advance


Name and version of the database you are using: Oracle 10g


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.