-->
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.  [ 1 post ] 
Author Message
 Post subject: Retrieving the configured Dialect at runtime.
PostPosted: Mon Dec 15, 2008 3:50 pm 
Newbie

Joined: Mon Dec 15, 2008 3:21 pm
Posts: 1
Location: Romania
Hi.

What's the proper way to retrieve the Dialect at runtime. The main idea is that I want to get the next value for a database sequence by creating a query independent of the Dialect used. For this I need the Dialect so that I can call getSequenceNextValString() on it.

I first tried to get the dialect from the Environment's properties and by calling Dialect.getDialect() method but in both cases I got a null reference.

Is it ok to cast the sessionFactory object to the SessionFactoryImplementor?

Thanks a lot.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.