我正在尝试从Spring-boot& JPA应用程序中调用存储过程
CREATE PROCEDURE [dbo].[StoredProc1] ()
AS
BEGIN
DECLARE @VAR INT
DECLARE @RET_CD INT
DECLARE @RET_MSG VARCHAR(100)
@VAR=1
IF @VAR=0
BEGIN
SET @RET_CD = 0
SET @RET_MSG = 'Sample Created'
SELECT @RET_CD, @RET_MSG
END
ELSE
BEGIN
SET @RET_CD = 4
SET @RET_MSG = 'Sample Rejected'
SELECT @RET_CD, @RET_MSG
END
END
当我在JPA中使用可调用语句调用上述存储过程时,我收到此错误:
javax.persistence.PersistenceException:org.hibernate.loader.custom.NonUniqueDiscoveredSqlAliasException:在自动发现native-sql查询期间遇到重复的sql别名[]