-->
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: Dynamic Schema Modification - best practice
PostPosted: Sat May 31, 2008 3:52 am 
Newbie

Joined: Sat May 31, 2008 3:38 am
Posts: 1
b]Hibernate version: 3.2[/b]

Name and version of the database you are using: any


Hi All,

I looking for the best possible solution in building a CRM like application, which amongst other features should provide the capability to the administrator to add/remove/modify fields on all entities available to the system.

Considering that the underlying persistancy is hibernate, what would be the best way to take this issue??

- Should I provide an additional table for every entity with dummy fields fo all type that should join with the "master" table?
- Another alternative would be to have a single table that would contain the values of all additional fields of the entier system, in which case every entry should contain sufficient information to reference back the appropriate "master" table.
- Finally, is dynamic manipulation of the database schema an option for hibernate? Combining such feature with dynamic mapping would possibly give me a good solution.


What are your suggestions on this case??

Thanks a lot,

Harry


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 31, 2008 7:53 am 
Expert
Expert

Joined: Tue Nov 23, 2004 7:00 pm
Posts: 570
Location: mostly Frankfurt Germany
IMHO there is no single best way. If you build up a number of tables, one holding the added column description, another the values, you don't have to update the mapping but you might have performance issues.

The faster approach is to change the tables and either to generate the XML or to work dynamic mappings. This will require to rebuild the sessionfactory.

_________________
Best Regards
Sebastian
---
Training for Hibernate and Java Persistence
Tutorials for Hibernate, Spring, EJB, JSF...
eBook: Hibernate 3 - DeveloperGuide
Paper book: Hibernate 3 - Das Praxisbuch
http://www.laliluna.de


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.