-->
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.  [ 1 post ] 
Author Message
 Post subject: strategy to map same model across 200 schemas?
PostPosted: Wed Mar 07, 2007 12:48 pm 
Newbie

Joined: Wed Mar 07, 2007 12:32 pm
Posts: 7
I have 200+ schemas that share a common table structure. I don't have to perform cross-schema queries such that like objects from different schemas are returned as a single result set. However, I would like objects in different schemas to be represented by the same class. I need all of the objects accessible from a single session rather than having 200+ session factories. What is a good strategy for doing this?

One class (and mapping) per schema using table per concrete class inheritance? I can specify the table name as "<schema>:<table>" and have it query against the appropriate schema. All of the classes could inherit from same interface to give me polymorphic behavior on my service layer.

One mapping file per schema per class? (can I even have multiple mappings point to the same class? prob not.)

Some mechanism to switch the schema for a class mapping at runtime that doesn't breakdown with concurrency usage? (Or switch the table mapping for the class at runtime. same difference.)

Map persistence to stored procedures to do the switching for me?

Other?

Thanks,
Jay


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.