Hibernate JPA @StoredProcedureParameter Example
@StoredProcedureParameter
The @StoredProcedureParameter annotation is used to specify a parameter of a @NamedStoredProcedureQuery.StoredProcedureParameter Specifies a parameter of a named stored procedure query. All parameters of a named stored procedure query must be specified.
Oracle REF_CURSOR named query stored procedure
@NamedStoredProcedureQueries(@NamedStoredProcedureQuery(
name = "sp_person_phones",
procedureName = "sp_person_phones",
parameters = {
@StoredProcedureParameter(
name = "personId",
type = Long.class,
mode = ParameterMode.IN
),
@StoredProcedureParameter(
name = "personPhones",
type = Class.class,
mode = ParameterMode.REF_CURSOR
)
}
)
)
Comments
Post a Comment