-->
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.  [ 9 posts ] 
Author Message
 Post subject: Customizing Table creation using hibernate.hbm2ddl.auto
PostPosted: Mon Apr 24, 2006 7:36 am 
Newbie

Joined: Thu Feb 02, 2006 1:34 pm
Posts: 6
Hi,

I am using hibernate.hbm2ddl.auto with create option to create tables. the tables i need to craete are listed in the hibernate cfg file. TABLES for all the hbms gets created.

Is there any way by which i can stop table creation of some of the hbms listed in my hibernate cfg file.

Any tag in the hbm file or hibernate cfg file which will stop the table creation for those hbms.


Top
 Profile  
 
 Post subject: Re: Customizing Table creation using hibernate.hbm2ddl.auto
PostPosted: Mon Apr 24, 2006 11:05 am 
Senior
Senior

Joined: Mon Aug 22, 2005 5:45 am
Posts: 146
shankar wrote:
Hi,

I am using hibernate.hbm2ddl.auto with create option to create tables. the tables i need to craete are listed in the hibernate cfg file. TABLES for all the hbms gets created.

Is there any way by which i can stop table creation of some of the hbms listed in my hibernate cfg file.

Any tag in the hbm file or hibernate cfg file which will stop the table creation for those hbms.


you have full controll over code-generation by passing your customized set of vm-templates.

1. extract the vm-files from hibernate-tools.jar
2. modifly control flow according to your needs
3. specify your own customized set of vm-files when running hbm2dll

(I have done this successfully)

_________________
Please don't forget to give credit, if my posting helped to solve your problem.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 24, 2006 3:06 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
have you done that for hbm2ddl ?

should not work ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 25, 2006 4:25 am 
Newbie

Joined: Thu Feb 02, 2006 1:34 pm
Posts: 6
Hi Max,

Can you kindly suggest a solution to address my query.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 25, 2006 5:00 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
we have work underway in hibernate 3.2 to let it be more pluggable.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 26, 2006 3:44 am 
Newbie

Joined: Thu Feb 02, 2006 1:34 pm
Posts: 6
Thnx Marx 4r ur reply

Can you kindly suggest any possible way out to address my solution until 3.2 work is rolled out.

any way by which i can stop table creation of some of the hbms listed in the hibernate cfg file.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 26, 2006 10:11 am 
Senior
Senior

Joined: Mon Aug 22, 2005 5:45 am
Posts: 146
max wrote:
have you done that for hbm2ddl ?

should not work ;)


I have done it for hbm2java (3.1alpha), so it should work for hbm2dll, also, I guess.

_________________
Please don't forget to give credit, if my posting helped to solve your problem.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 28, 2006 5:06 am 
Newbie

Joined: Thu Feb 02, 2006 1:34 pm
Posts: 6
Hi Max,

can you kindly tell what changes u have done in hbm2java so that i can have a look at it and try 4r hbm2ddl.

i mean how to use the changes u have done 4r hbm2java.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 28, 2006 9:41 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hbm2ddl is using schemaexport/schemaupdate to do its thing. these two classes does not yet support any "templating"/customization.

hbm2java (and all the other code generation tasks) is templatized/customizable by their nature.

_________________
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.  [ 9 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.