我正在尝试使用EclipseLink来调用存储过程(在Oracle数据库中),当我尝试调用时,我总是找不到命名查询。
我尝试使用entityManager.createNamedQuery
,createdNamedStoredProcedureQuery
和JpaEntityManager
创建查询方法。
我的声明是:
@NamedPLSQLStoredProcedureQueries({@NamedPLSQLStoredProcedureQuery( name = "ChangeTheStatusForTheLoadedARTransactions"
, procedureName = "OALEDU_LC_API_PKG.DERIVE_CD_DATA"
, parameters = {@PLSQLParameter( name = "p_ar_data"
, direction = Direction.IN
, databaseType = "OALEDU_LC_API_PKG.T_AR_TYPE" )}
)})
@Embeddable
@Struct( name = "LOADED_AR_TRANSACTIONS"
, fields = {"INTERFACE_LINE_ATTRIBUTE1, INTERFACE_STATUS, INTERFACE_LINE_ID"})
@PLSQLRecord( name = "OALEDU_LC_API_PKG.T_AR_REC"
, compatibleType = "OALEDU_LC_API_PKG.T_AR_REC"
, javaType = LoadedArTransaction.class
, fields={ @PLSQLParameter(name = "INTERFACE_LINE_ATTRIBUTE1", databaseType = "NUMBERIC_TYPE")
, @PLSQLParameter(name = "INTERFACE_STATUS")
, @PLSQLParameter(name = "INTERFACE_LINE_ID", databaseType = "NUMBERIC_TYPE")})
public class LoadedArTransaction {...}
如果有人有经验,可以告诉我,我错过了什么或做错了什么,我会很感激的!