Hi,
I'm using Spring 4, hibernate 4.3.8 and jpa 2.1. I've set the property hibernate.default_schema to specify the schema to use. Every select append the schema correctly. However, i'm trying to call a stored procedure and the default schema is not appended. Is there any configuration to achieve this ? I know that StoredProcedure is still new with hibernate 4.3. Maybe it's a bug ?
Here's my entity :
Code:
@Entity
@Table(name = "V_RS_RECHR_DISPO_CARTE")
@NamedStoredProcedureQueries({
@NamedStoredProcedureQuery(
name = "RechrDispoCarteVW.initRechrDispoCarte",
procedureName = "pck_rechr_dispo.init_rechr",
parameters = {
@StoredProcedureParameter(mode = ParameterMode.IN, name = "PDA_DATE_DEBUT_SEJR",
type = Date.class),
@StoredProcedureParameter(mode = ParameterMode.IN, name = "PNU_NOMBR_NUITE", type = Long.class),
@StoredProcedureParameter(mode = ParameterMode.IN, name = "PNU_DATE_FLXBL", type = Long.class),
@StoredProcedureParameter(mode = ParameterMode.IN, name = "PNU_REF_TERRITOIRE",
type = Long.class),
@StoredProcedureParameter(mode = ParameterMode.IN, name = "PNU_REF_SECTEUR", type = Long.class),
@StoredProcedureParameter(mode = ParameterMode.IN, name = "PNU_REF_TYPE_UNITE",
type = Long.class),
@StoredProcedureParameter(mode = ParameterMode.IN, name = "PNU_REF_SOUS_TYPE_UNITE",
type = Long.class),
@StoredProcedureParameter(mode = ParameterMode.IN, name = "PNU_REF_ACTIVITE",
type = Long.class),
@StoredProcedureParameter(mode = ParameterMode.IN, name = "PNU_REF_PRODUIT", type = Long.class),
@StoredProcedureParameter(mode = ParameterMode.IN, name = "PVA_CARACTERISTIQUE",
type = String.class)
}
)
})
Here's the call using jpa
Code:
StoredProcedureQuery s =
this.getEntityManager().createNamedStoredProcedureQuery("RechrDispoCarteVW.initRechrDispoCarte");
And the executed SQL is Hibernate: {call pck_rechr_dispo.init_rechr(?,?,?,?,?,?,?,?,?,?)}
Thank you