-->
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: Dynamic table routing
PostPosted: Thu Sep 04, 2008 5:10 pm 
Newbie

Joined: Tue Jan 08, 2008 3:59 pm
Posts: 1
I have a readonly model that is mapped to a view using annotations. For optimization reasons I would like to be able to dynamically change the view that the model is mapped to on runtime. The views will contain the same structure and will be in the same database schema. I found the following blog post on using the HibernateInterceptor interface to intercept the prepared statement and then change the view name in the select.

[url]
http://www.alvinsingh.org/blog/2008/06/ ... e-routing/
[/url]

I'm wondering if:

1. This only effects the current session or if it's context based?
2. It's session based will I need to change the prepared statement back to it's original form after I'm done with the query?
3. If there is a better way to do this.
[/url]


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.