• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get Schema name using hibernate  RSS feed

 
RanguAnil Kumar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
I am using hibernate in my application, i have to display table schema name to the user. but i am not able to get schema name. can any one help me or send me sample code.


Thanks
Anil Rangu
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might through the SessionFactory to get to the Configuration and looking through the mappings in code to find the database schema.

I guess probably easier would be to get a JDBC Connection from a Session object and use jdbc to get it.

In both cases, I haven't had to try that, so I am just making a guess.

Mark
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!