-->
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.  [ 2 posts ] 
Author Message
 Post subject: Create table with Hibernate
PostPosted: Tue Dec 30, 2008 6:45 am 
Newbie

Joined: Tue Dec 30, 2008 4:42 am
Posts: 2
Hello, I'm developing a web application using Java (NetBeans 6.0) and Hibernate 3.3, in this application the user can create or delete new tables; for this operation I can't use the mapping files and java classes to define and manipulate the structure of those tables (they didn't exists yet when I write the code of the program) so I would use an HQL query like CREATE TABLE, ALTER TABLE ecc, how can I do this?
Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 30, 2008 7:38 pm 
Newbie

Joined: Tue Dec 30, 2008 6:52 pm
Posts: 3
I am not sure HQL can do this, but you could use regular SQL as Hibernate supports native SQL queries.

But why would you want to allow a user to create and delete tables in the first place? It can be a good solution in specific cases, but it often a sign of bad design.


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