-->
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: How To Create Table in HQL
PostPosted: Fri Nov 25, 2005 1:37 am 
Newbie

Joined: Thu Nov 24, 2005 1:02 pm
Posts: 1
Hi ,

How can we create Table in Hibernate Query Language without using XML mapping file or is there any mechanism through which we can create mapping file dynamically .

Problem :

I dont know the exact number of columns present the table since it will be based on user's request.

In SQL we have CREATE Table command similarly do we have any such command in HQL.

Something like this :

"CREATE TABLE Sells (bar VARCHAR(40))" ;


Thanks
Ritesh


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 25, 2005 1:52 am 
Senior
Senior

Joined: Tue Aug 23, 2005 8:52 am
Posts: 181
Take a look at the javadoc for org.hibernate.mapping package. The Table Class has methods to add Columns and collections and other stuff.
Just curious, how are you going to create tables dynamically? The stuff in org.hibernate.mapping is for the Hibernate mappings and not for the Table Creation in a DB.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 25, 2005 8:36 am 
Pro
Pro

Joined: Mon Jan 24, 2005 5:39 am
Posts: 216
Location: Germany
I think the recommended method is
to create tables using jdbc.

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