-->
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.  [ 6 posts ] 
Author Message
 Post subject: Will Hibernate support add/drop columns/tables in runtime?
PostPosted: Mon Jun 07, 2004 4:13 pm 
Newbie

Joined: Mon Jun 07, 2004 3:29 pm
Posts: 4
Hi,

I'm developing an application that allows the end-user to modify the database schema in runtime. The user can add or drop columns or tables...

I was considering Hibernate 2.1 as the persistence layer, but I can't use it for my purpose. However, someone told me that Hibernate 2.2 will support this. Is this true? (How can I do it? Can you point me to any doc/code?)

(Right now, time is not a constraint, so I can wait for Hibernate 2.2 or 3 to become available.)

Thanks in advance!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 07, 2004 4:15 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
We decided to rename Hibernate 2.2 to Hibernate 3.0. An alpha release will be available before the end of the year (hopefully in a couple of months).

Hibernate3 module in CVS.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 08, 2004 9:37 am 
Newbie

Joined: Mon Jun 07, 2004 3:29 pm
Posts: 4
Thanks gavin, but just to be sure, does Hibernate 3 support add/drop columns/tables in runtime?

Thanks again!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 08, 2004 10:43 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
No, it adds support for dynamic data models (trees of hashmaps). Adding and dropping columns should be done by your application.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 10, 2004 3:15 pm 
Newbie

Joined: Tue Aug 10, 2004 2:50 pm
Posts: 2
Gavin, How can I find out more about "dynamic data models (trees of hashmaps)." I am trying to do the same (adding attributes to objects at runtime without having to recompile). We have considered doing this using hashmaps (we can handle adding the columns and tables from the application), and it seems like a good approach in our case. I do have some questions about the hibernate feature available for this, will I still be able to do record locking, have transaction control, and use hibernates query language?

I'd like to create a working example of this. I downloaded hibernate 3.0 from CVS and I am trying to locate any documentation or code that will help me try this out. As I read in the hibernate website, this should be done in hibernate 3.0 alpha release.

_________________
Cesar Bustamante
Sr. Oracle DBA
Intranexus, Inc


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 10, 2004 4:59 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
The feature you are looking for is mapped using the new "dynamic-class" mapping element. I have not seen any documentation on this particular feature. Start by looking at the DTD. If you are somewhat comfortable with Hibernate concepts and modeling in general, this should be fairly understandable. About the only real difference between dynamic-class and class, is that the "entity-name" attribute is required for dynamic-class mappings (its used as your handle to that mapping, much like the class name would be for mapped classes) and the returned class is a map.


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