-->
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: Does named hibernate query supports optional parameters?
PostPosted: Sun Feb 20, 2005 10:26 pm 
Newbie

Joined: Wed Feb 02, 2005 11:19 pm
Posts: 6
Hi,

I am trying to replace an in-house SQL query engine with hibernate's named query and am wondering if hibernate supports optional parameters?

for eg.
Code:
<query name="testQuery">
  SELECT BALANCES.AMT_BLNC FROM
  BALANCES, ACCOUNTS
  WHERE
  BALANCES.ACCT_ID = ACCOUNTS.ID_ACCT

  <OPTIONAL PARAM="instrumentUID">
     AND BALANCES.INS = :instrumentUID
  </OPTIONAL>
</query>   



Basically the optional parameter instrumentUID is included into the query when it is not empty.



- Jim


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 21, 2005 8:22 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
No, there is no such thing.


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.