-->
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: Can parameterize table name in "createSQLQuery"?
PostPosted: Tue Feb 21, 2006 2:22 am 
Newbie

Joined: Tue Feb 21, 2006 2:00 am
Posts: 14
Location: Seoul, Korea
first, sorry for my poor english..

I must use native sql using hibernate.

My sql like this..

Code:
select * from XXX Where dd=:dd and gg=:gg

Hear the table name(XXX) change dynamically at run time(YYY,ZZZ...).

but the all the XXX...ZZZ table schema are same.

I want to parameterize this table name like other parameters, if it is possible.

It is not recommended sql string composite out of "createSQLQuery" method.

thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 21, 2006 2:47 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
no, not possible.

what about creating a view that you can select from which maps to the underlying table.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: hm...
PostPosted: Tue Feb 21, 2006 3:33 am 
Newbie

Joined: Tue Feb 21, 2006 2:00 am
Posts: 14
Location: Seoul, Korea
hm... I see that's not possible.
Thank you for your answer.


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.