Spring Boot and JPA: unable to pass Custom object to stored procedure

390 views
Skip to first unread message

Amol Dhagdi

unread,
Mar 27, 2018, 9:37:10 AM3/27/18
to mybatis-user
This is type 

create OR REPLACE type Temp as object
(
rollNo NUMBER     
,Name VARCHAR2 (50)   
,age NUMBER 
);

This is Procedure 

CREATE OR REPLACE procedure InsertStud (
record IN Temp 
) as
begin
INSERT INTO Stud Values(record);
End;


This is JPA code 

StoredProcedureQuery query = em.createStoredProcedureQuery("InsertSalesOrder");
query.registerStoredProcedureParameter("orderd", Object.class, ParameterMode.IN);
query.setParameter("orderd", studentObj);
query.execute();


Error
org.hibernate.exception.SQLGrammarException: Error calling CallableStatement.getMoreResults



Could you please help me

François Schiettecatte

unread,
Mar 27, 2018, 9:41:38 AM3/27/18
to mybati...@googlegroups.com
What does this have to do with myBatis? This looks like a Hibernate issue…

François

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages