Is it possible to call oracle function other than procedure with Hibernate JPA? How?
I'm developing a web app with JBoss seam + Hibernate JPA, and I'd like to call an oracle function with JPA 's entityManager.createNativeQuery APIã€‚ But I failed.
The code has follows:
//===Java code with JPA
The oracle function is defined as follows:
//===Oracle function def
CREATE OR REPLACE FUNCTION get_filelist (p_path IN VARCHAR2)
NAME 'FileList.RunThis(java.lang.String) return String';
The error code is as follows:
PLS-00221: 'GET_FILELIST' is not a procedure or is undefined .
In fact, I can see the get_filelist with sqlplus when typing 'desc get_filelist'.
Thanks for your suggestion.