-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
My repository calling stored procedure like this,
@Procedure(procedureName = "sp_name")
Map<String, Integer> callingSP();
sp_name is look like this
CREATE PROCEDURE [dbo].[sp_name] AS BEGIN
SET NOCOUNT ON;
MERGE dbo.table1 AS Target
USING (
SELECT *
FROM
dbo.table2
)
AS Source
ON
(
Target.id = Source.id
)
WHEN MATCHED
THEN
UPDATE
...
WHEN NOT MATCHED BY TARGET THEN
INSERT
....
OUTPUT DELETED.ID as DELETED , $action AS [Action] , INSERTED.ID as INSERTED
;
END;
GO
Am trying to see if I could return a map of key and values pair of results from sql server stored procedure but am facing below error,
Type cannot be null; nested exception is java.lang.IllegalArgumentException: Type cannot be null"
Is it possible to return such a Map entries from CrudRepository by calling database procedure name using just @procedure annotation?
Note: am not using any names procedure queries btw and calling generic procedure with no input expecting
OUTPUT DELETED.ID as DELETED , $action AS [Action] , INSERTED.ID as INSERTED parameter results.
Questions:
- Does @procedure support multiple output parameter?
- Does @procedure support object return type?
- If this is not something achievable with @procedure annotation why not this as a feature request?
- I do not want to specify any NamedStoredProcedure as my database stored procedure is playing with multiple table and return some OUTPUT clause results or @table as an object. from application side only calling the SP and getting the results using @procedure annotation is the requirement.
Metadata
Metadata
Assignees
Labels
No labels