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
|