-->
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: How to retrieve Backend or Dialect???
PostPosted: Fri Mar 10, 2006 8:14 am 
Newbie

Joined: Wed Aug 24, 2005 12:07 pm
Posts: 17
Hi All,
I am using hibernate 3 in one of my application and my application works on different databases as backend.I have not specified dialect in my hibernate.cfg.xml file.Now I want to know programatically which dialect I am using without specifying in the hibernate.cfg.xml.Does hibernate API have some method through which I can retrieive the Dialect Name or the database which I am using as a backend.Please let me know if anyone has some idea over it.All suggestions are welcome.
Thanx in advance
Chirag.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 10, 2006 2:30 pm 
Regular
Regular

Joined: Wed Feb 08, 2006 3:59 pm
Posts: 75
Code:
        ((SessionFactoryImpl) sessionFactory).getSettings().getDialect();


Obviously it will break if sessionFactory is not actually a SessionFactoryImpl.


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.