-->
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.  [ 3 posts ] 
Author Message
 Post subject: Mysql t0 Oracle
PostPosted: Tue May 09, 2006 1:32 pm 
Newbie

Joined: Fri Nov 04, 2005 11:37 am
Posts: 6
Hi,

I have a J2EE application that uses hibernate with mysql database,now I want to run it with Oracle database with minimum changed to my code.

I understand I have to change my cgf files for changing the dialect,but is there any way to restrict changes to hbm files and java file (mapping class,if required to change).

for eg:- in mysql hbm I am using org.hibernate.id.IdentityGenerator for identity where as for Oracle I have to use sequence.

for this change I have to modify all hbm files,is there any way to do this by not modifying hbm files ?

I found one solution on web that says extend SequenceGenerator and override configure but I am not sure if
1) I can use it with same hbm file (Id generator)
2) Is it good idea to modify hibernate code?

Cheers
-Praful


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 09, 2006 8:53 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
In the case of the generator I also use the native generator. This delegates to the native method of the database, eg sequence on Oracle and Identity on MySQL.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 09, 2006 11:00 pm 
Newbie

Joined: Fri Nov 04, 2005 11:37 am
Posts: 6
Thanks a Buch David,will try that

-Praful


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