-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: StoredProcedureQuery and default schema
PostPosted: Mon Feb 09, 2015 2:28 pm 
Newbie

Joined: Mon Feb 09, 2015 2:19 pm
Posts: 1
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


Top
 Profile  
 
 Post subject: Re: StoredProcedureQuery and default schema
PostPosted: Mon Feb 09, 2015 9:56 pm 
Newbie

Joined: Mon Feb 09, 2015 5:04 pm
Posts: 6
Sometimes I need what only you can provide: your absence. If you cannot assist, don't bother responding. Your attempt at sounding as grammatically superior is far less than brilliant.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.