Hi All,
I have to call a pipelined function in oracle from hibernate. How do i call it ?
I tried calling it through native query and named query , nothing works and give me exception
By Native Query: select * from table(WS_SAMPLE_PACKAGE.pipe_properties(1)) and it gives : No Dialect mapping for JDBC type: 2003
By Named Query @NamedNativeQuery(name="testTypeQuery",query="{ ? = call WS_SAMPLE_PACKAGE.pipe_properties(1) }", hints={@javax.persistence.QueryHint(name = "org.hibernate.callable", value = "true")}) and it gives : occuredjavax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
Do i need to some mapping with the custom object i created in oracle to hibernate ? The Function will be return PRIMARY_L_OBJ ---------------script of the objects --------------- CREATE OR REPLACE TYPE PRIMARY_L_OBJ AS OBJECT ( l_key VARCHAR2(14 BYTE), L_STATUS NUMBER(1, 0), start_date NUMBER(8, 0), constructor function PRIMARY_L_OBJ return self as result );
CREATE OR REPLACE TYPE BODY PRIMARY_L_OBJ AS CONSTRUCTOR FUNCTION PRIMARY_L_OBJ RETURN SELF AS RESULT AS BEGIN SELF.l_key :=null; SELF.L_STATUS :=null; SELF.start_date :=null; RETURN; END; END;
CREATE OR REPLACE TYPE PRIMARY_L_OBJ_TABLE AS TABLE OF PRIMARY_L_OBJ; ------ end --------------
|