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.  [ 5 posts ] 
Author Message
 Post subject: Change the database encoding.
PostPosted: Tue Jun 28, 2005 4:53 am 
Newbie

Joined: Tue Jun 28, 2005 4:43 am
Posts: 4
Location: Tres Cantos
I want to know if it's possible to set the database encoding to use with Hibernate within an application.
It's for sorting String literals in alphabetical order depending of the country language.
Thanks a lot.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 28, 2005 6:46 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
just set it as you would do in any other jdbc application.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 28, 2005 7:09 am 
Newbie

Joined: Tue Jun 28, 2005 4:43 am
Posts: 4
Location: Tres Cantos
In any other jdbc application I can put something like:

Locale LOC = new Locale("ES", "es");
Locale.setDefault(LOC);

but with Hibernate, i have not the control of the Connection. Hibernate manages it with the values set in the hibernate.cfg.xml.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 28, 2005 7:15 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you did not touch the connection in that code....so why dont you just setup that code before you call hibernate ?

or simply provide your own connection provider if you want some specific done to your connection.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 28, 2005 10:10 am 
Newbie

Joined: Tue Jun 28, 2005 4:43 am
Posts: 4
Location: Tres Cantos
OK!!
I have done it and it works. Sometimes the right answer is the easiest.
Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.