-->
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.  [ 8 posts ] 
Author Message
 Post subject: DDL generation listener
PostPosted: Mon Jun 05, 2006 10:41 am 
Newbie

Joined: Mon Jun 05, 2006 10:30 am
Posts: 7
Hi all,

i'm trying to setup my development environment to use the hibernate.hbm2ddl.auto setting.

It seems that none of the available settings provide the behaviour i want. The ideal solution for me would be a cross between the create and the update, as i don't want to loose the data but i want the schema to be update to reflect exactly my domain model.

A possible solution would be for me would be to use the create option, do an export of the data just before the tables are dropped, and do an import after the tables are created. If an error occurred with the execution,like when a column was dropped, then the user himself would have to deal with it.

Anyway, is there i way i can listen to these drop and create events ?

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 05, 2006 11:15 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
not currently.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 05, 2006 11:25 am 
Newbie

Joined: Mon Jun 05, 2006 10:30 am
Posts: 7
max wrote:
not currently.


Can you tell me if something like this is going to be implemented soon ?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 05, 2006 11:27 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
we want to make the ddl generation more pluggable (so we don't have to provide every conceivable DBA optimization ;) ...but it when it will be done i cannot say. It is not a top priority at the moment.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 23, 2006 8:12 am 
Newbie

Joined: Wed Aug 23, 2006 7:59 am
Posts: 7
Is there any more info on this? I'm dealing with the same problem. I am willing to spent some time here, if there already is an issue or piece of iplementation somewhere?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 23, 2006 9:18 am 
Newbie

Joined: Wed Aug 23, 2006 7:59 am
Posts: 7
okay never mind, I've just not implemented my custom generator properly, so the update SQL threw me an exception, that's why my new tables weren't created. It seems the update value just is what i need, sorry for the spam :)


Top
 Profile  
 
 Post subject: Hibernate Schema generation from database
PostPosted: Sat Mar 10, 2007 11:22 am 
Newbie

Joined: Tue Feb 13, 2007 11:54 am
Posts: 2
Can you please tell me if it's possible to generate hibernate mapping files having existing mysql database?
Thanks for help.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 10, 2007 1:26 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yes it is possible like with any other db that has proper jdbc support.

_________________
Max
Don't forget to rate


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