views:

23

answers:

2

hi,

i really need a basic hibernate implementation calls oracle plsql function. it must include configurations, dao and test class.

is there any example for that?

A: 

Did you try to get started with the official documentation, the section 16.2.2. Using stored procedures for querying also covers functions? I doubt you'll find exactly what your asking for. And if you face a specific problem, ask a more specific question.

References

Pascal Thivent
A: 

hi,

this is a part of my config file for calling store procedure:

sql-query name="selectAllClients_SP" callable="true" return alias="tmus" class="TMusteri" return-property name="clientNo" column="client_no" return-property name="name" column="name" return { ? = call selectAllClients() } sql-query >

selectAllClients is a procedure which return sys_refcursor.


and i have a class like that:

public class TMusteri implements Serializable{ /** * */ private static final long serialVersionUID = 1L; private Long clientNo; private String name; private Long tckNo;


to call procedure i use:

Query query=(Query)getSession().getNamedQuery("selectAllClients_SP"); query.executeUpdate(); (List) query.list();


but i get error? so where is my error?

mehmet