• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

turn off schema in hibernate

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

Is it possible for hibernate (I'm using version 3.1.3) to generate sql statements without schema?

For example:
I want: SELECT * FROM MY_TABLE;

and NOT as: SELECT * FROM MY_SCHEMA.MY_TABLE;

I didn't find a way to turn off schema.

Best regards,
Igor Novak
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Iam facing the same issue now. Pls help if anyone knows about the solution for this. Thanks
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<sarcasm>
"Holy thread from the dead Batman!"

"You're right Robin. This is a thread from the Dead!"
</sarcasm>

I would think that the schema would be identified by the database connection string found in the hibernate properties file.
 
sowjan kumar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Nathan Hook:
<sarcasm>
I would think that the schema would be identified by the database connection string found in the hibernate properties file.



You are right. What really is needed is how in the .hbm.xml file we do configurations in such a way that we terminate the schema. For ex..the SQL that hibernate generates from the XML is

select mmsservice0_.SERVICE as col_0_0_ from PROD40.PR.MMS_SERVICE mmsservice0_

where PROD40 is the schema name and PR is the username. I need to have the SQL as follows
select mmsservice0_.SERVICE as col_0_0_ from PR.MMS_SERVICE mmsservice0_
 
sowjan kumar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Because of this am getting the following error

17:17:07,053 WARN [JDBCExceptionReporter] SQL Error: 933, SQLState: 42000
17:17:07,053 ERROR [JDBCExceptionReporter] ORA-00933: SQL command not properly ended

17:17:07,053 ERROR [MmsDataRetrieval] [MFINDT-SKUMARA][ERR3876] HibernateException caught, rethrowing as MmsDataAccessException.
17:17:07,053 WARN [GlobalRFT] [MFINDT-SKUMARA][WRN0000] Unable to initialise GRFT
 
reply
    Bookmark Topic Watch Topic
  • New Topic