-->
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: Named parameter in SQL From clause: impossible?
PostPosted: Wed May 23, 2007 7:34 pm 
Newbie

Joined: Wed May 23, 2007 7:29 pm
Posts: 2
I'm quite certain it's not possible, but would appreciate a confirmation. I'm going for run-time-generated SQL queries.

Code:
[5/23/07 18:17:18:925 CDT] 00000030 DefaultFaultH E   TRAS0014I: The following exception was logged java.lang.IllegalArgumentException: Parameter schema does not exist as a named parameter in [SELECT m.col1 AS {member.col1}, m.col2 AS {member.col2}
      FROM :schema.mbr m WHERE
      m.id = :ID
      FOR READ ONLY with UR]


Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 23, 2007 8:26 pm 
Newbie

Joined: Wed May 23, 2007 7:29 pm
Posts: 2
What are the advantages of using hibernate in comparison to a plain PreparedStatement? I guess one of the advantages is caching. But on the other hand, a PreparedStatement can be used multiple times for efficiency, whereas this efficiency will be foresaken when using a hibernate-based runtime-generated query, won't it?


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.