-->
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: Schema/Database creation on-the-fly.
PostPosted: Tue Apr 03, 2007 4:58 am 
Newbie

Joined: Tue Apr 03, 2007 4:42 am
Posts: 1
Hello everyone;

We are currently developing applications using Hibernate3. We have an old application written on Java, which will be developed from scratch.

This application provides some financial portal features for users. If a user sign-on, application creates a new schema on database side for storing all information about this user data's. In old way (with JDBC), all this stuff is done manually with queries, but it's really horrible to read that code, so we want to use Hibernate for database abstraction.

I have read that i can load Hibernate configuration's on SessionFactory on-the-fly. But my question is "Can I create schema's on-the-fly".

Case Example:
A users log-on to the system, creates a portal, and then i will create the appropriate schema for this user dynamiclly. I have searched for this kind of operation at Google, but no results.

Thanks in advance for your response;

Sing.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 03, 2007 7:10 am 
Expert
Expert

Joined: Thu Sep 04, 2003 8:23 am
Posts: 368
Configuration class have methods called : generateDropSchemaScript, generateSchemaCreationScript and generateSchemaUpdateScript

They give ddl revelant to configuration files that you gave to the configuration class. If you want to be more low level you can also use hibernate objects for Table, Column, Keys, ... we use them in our application to generate update scripts.

_________________
Seb
(Please don't forget to give credits if you found this answer useful :)


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.