Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » set schema name for stored procedures using JPA
set schema name for stored procedures using JPA [message #778629] Fri, 13 January 2012 15:07 Go to next message
Sridhar Baratam is currently offline Sridhar BaratamFriend
Messages: 22
Registered: September 2011
Junior Member
Hello All:

I am using an Oracle database which has a schema name associated with it. I am able to use the SessionCustomizer override
session.getLogin().setTableQualifier(schema) to set the schema name. However, this only works for tables. When I try to call a stored procedure using a named query, it does not get honoured and I get procedure not found errors.

Can you please help me in this regard?

I appreciate all the help.

Thanks
Sridhar
Re: set schema name for stored procedures using JPA [message #779886 is a reply to message #778629] Mon, 16 January 2012 18:44 Go to previous messageGo to next message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

There is currently no tableQualifier on StoredProcedureCall. Please log a bug to have one added, and default to the login's qualifier.

As a workaround you will need to qualify the procedure name using "schema.procedure" when you define or execute your stored procedure.

You could also default the user's schema, so no tableQualifier is required.


James : Wiki : Book : Blog : Twitter
Re: set schema name for stored procedures using JPA [message #779888 is a reply to message #778629] Mon, 16 January 2012 18:44 Go to previous messageGo to next message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

There is currently no tableQualifier on StoredProcedureCall. Please log a bug to have one added, and default to the login's qualifier.

As a workaround you will need to qualify the procedure name using "schema.procedure" when you define or execute your stored procedure.

You could also default the user's schema, so no tableQualifier is required.

--
James : http://wiki.eclipse.org/EclipseLink : http://en.wikibooks.org/wiki/Java_Persistence : http://java-persistence-performance.blogspot.com/


James : Wiki : Book : Blog : Twitter
Re: set schema name for stored procedures using JPA [message #780286 is a reply to message #779888] Tue, 17 January 2012 14:34 Go to previous messageGo to next message
Sridhar Baratam is currently offline Sridhar BaratamFriend
Messages: 22
Registered: September 2011
Junior Member
Thanks James. I will logon a bug as requested. I have a question with regards to your recommendation "You could also default the user's schema, so no tableQualifier is required". Is that using the orm.xml <schema>OWNERS_SCHEMA</schema> tags?

Thanks
Re: set schema name for stored procedures using JPA [message #780288 is a reply to message #779888] Tue, 17 January 2012 14:34 Go to previous messageGo to next message
Sridhar Baratam is currently offline Sridhar BaratamFriend
Messages: 22
Registered: September 2011
Junior Member
Thanks James. I will logon a bug as requested. I have a question with regards to your recommendation "You could also default the user's schema, so no tableQualifier is required". Is that using the orm.xml <schema>OWNERS_SCHEMA</schema> tags?

Thanks
Re: set schema name for stored procedures using JPA [message #780854 is a reply to message #780286] Thu, 19 January 2012 16:29 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

No, you can do that on your database when your DBA creates your user.


James : Wiki : Book : Blog : Twitter
Re: set schema name for stored procedures using JPA [message #781005 is a reply to message #780286] Thu, 19 January 2012 16:29 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

No, you can do that on your database when your DBA creates your user.

--
James : http://wiki.eclipse.org/EclipseLink : http://en.wikibooks.org/wiki/Java_Persistence : http://java-persistence-performance.blogspot.com/


James : Wiki : Book : Blog : Twitter
Re: set schema name for stored procedures using JPA [message #781022 is a reply to message #780286] Thu, 19 January 2012 16:29 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

No, you can do that on your database when your DBA creates your user.

--
James : http://wiki.eclipse.org/EclipseLink : http://en.wikibooks.org/wiki/Java_Persistence : http://java-persistence-performance.blogspot.com/


James : Wiki : Book : Blog : Twitter
Re: set schema name for stored procedures using JPA [message #781039 is a reply to message #780286] Thu, 19 January 2012 16:29 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

No, you can do that on your database when your DBA creates your user.

--
James : http://wiki.eclipse.org/EclipseLink : http://en.wikibooks.org/wiki/Java_Persistence : http://java-persistence-performance.blogspot.com/


James : Wiki : Book : Blog : Twitter
Previous Topic:Shared cache on multi base using same classes
Next Topic:Error when trying to use PLSQLTable type as an IN parameter in a PLSQLStoredProcedure in eclipse lin
Goto Forum:
  


Current Time: Fri Dec 19 08:42:37 GMT 2014

Powered by FUDForum. Page generated in 0.10615 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software