-->
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.  [ 4 posts ] 
Author Message
 Post subject: Addition dialect without to recompile hibernate
PostPosted: Thu Jul 10, 2008 1:41 am 
Newbie

Joined: Thu Mar 27, 2008 9:28 am
Posts: 9
Hi,

I want to add a dialect for a database (the dialect is not in Hibernate) without recompile Hibernate.

Is it possible?

Thanks

Jérôme


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 10, 2008 11:03 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
This should just be a configuration change in your XML.

Which dialect are you changing to? What was is previously?

I don't see a need for a recompile.

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 10, 2008 4:14 pm 
Regular
Regular

Joined: Fri May 12, 2006 4:05 am
Posts: 106
No need to recompile the whole hibernate-package if you just want to create a custom Dialect.
Just code some Class extending org.hibernate.dialect.Dialect in some arbitrary package - e.g. my.application.dialects.CustomDialect
Then just put it in your hibernate.cfg.xml-file like this:
Code:
...
<session-factory>
   ...
   <property name="dialect">my.application.dialects.CustomDialect</property>
   ...
</session-factory>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 11, 2008 1:08 am 
Newbie

Joined: Thu Mar 27, 2008 9:28 am
Posts: 9
OK thanks

I thought that we were to oblige to put dialects in the code of hibernate.


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