Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

turn off schema in hibernate

 
Igor Novak
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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
 
sowjan kumar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Iam facing the same issue now. Pls help if anyone knows about the solution for this. Thanks
 
Nathan Hook
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic