-->
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.  [ 1 post ] 
Author Message
 Post subject: How can I customize the DDL generated with Hibernate's hbm2d
PostPosted: Thu Jan 06, 2011 5:34 am 
Newbie

Joined: Wed Nov 03, 2010 5:34 am
Posts: 4
Hello,

here's what I want to do:
I'm using Hibernate (3.3.2) to map my Ingres 10 database. My java entities are generated after a meta model, so we decided to use annotations to ease things.
What we want to do after the code generation is generate the DDL instructions to create the database so we use the hbm2ddl tool and we have something like:

Code:
drop table xxx;
create table xxx ...;

What I miss here are extra SQL statement to e.g. add privileges on tables, something like:

Code:
drop table xxx;
create table xxx ...;
grant xxx on table xxx;


I know I could use something called database-object to generate such statements but I think it's only available with the XML mapping. Can you confirm this?
If that is confirmed, do you see a better solution for doing such a thing?
Many thanks to all.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.