-->
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: Creating multiple data contexts from one hibernate data mode
PostPosted: Tue Dec 28, 2004 3:42 pm 
Newbie

Joined: Fri Dec 17, 2004 12:54 pm
Posts: 13
Hi,
I’m developing one web application with one data model using hibernate. My catch is that I’ll have different clients using the same application but I want each client to have its own set of database tables that mirrors the data model. It seems like this would be a cleaner approach than trying to code contextID’s into my data model. The flip side though is that if I make a schema change then I’ll have multiple sets of tables that will need to be updated. Does anyone have any advice as to how I should go about this? Thanks


Top
 Profile  
 
 Post subject: Re: Creating multiple data contexts from one hibernate data
PostPosted: Tue Dec 28, 2004 6:16 pm 
Contributor
Contributor

Joined: Thu Nov 06, 2003 9:49 pm
Posts: 104
Location: New York, NY
krebsnet wrote:
Hi,
I’m developing one web application with one data model using hibernate. My catch is that I’ll have different clients using the same application but I want each client to have its own set of database tables that mirrors the data model. It seems like this would be a cleaner approach than trying to code contextID’s into my data model. The flip side though is that if I make a schema change then I’ll have multiple sets of tables that will need to be updated. Does anyone have any advice as to how I should go about this? Thanks


It is much easier to add a 'client' object to the model, add the appropriate associations on the objects that are owned by each client, and then let the DAOs take care of accessing the objects in the appropriate context.

Creating a separate set of tables per 'client' will probalby just cause you a world of pain.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 28, 2004 6:26 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Also, you could probably use dynamic-filters of H3 here very nicely.


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.