-->
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: ParameterNode cannot be cast to org.hibernate.hql.ast.tree
PostPosted: Tue Apr 29, 2014 1:17 pm 
Newbie

Joined: Tue Apr 29, 2014 1:13 pm
Posts: 2
guys thans for time and help
i have HQL Query using case and paramater and i get a error when i set the parameters
my query is:

Code:
SELECT
IC.Sources,
IC.Total,
IC.Destination,
IC.Where,
ICP.Date,
ICP.filedirectory,
ICP.filename
FROM IcmA AS IC, IcmProc AS ICP
WHERE IC.uniqueid = ICP.uniqueid
AND IC.Sources = :Num OR IC.Destination= :Num
AND CASE
WHEN LENGTH(IC.Sources) = 1 OR LENGTH(IC.Destination) = 1 THEN
:NBalance
WHEN LENGTH(IC.Sources) > 1 OR LENGTH(IC.Destination) > 1 THEN
:NBalance
ELSE
:NBalance
END = :NBalance
AND(DATE_FORMAT(ICP.Date, '%Y/%m/%d') >= :fDate AND DATE_FORMAT(ICP.Date, '%Y/%m/%d') <= :tDate) ORDER BY ICP.Date DESC


Error:
Code:
java.lang.ClassCastException: org.hibernate.hql.ast.tree.ParameterNode cannot be cast to org.hibernate.hql.ast.tree.SelectExpression


Top
 Profile  
 
 Post subject: Re: ParameterNode cannot be cast to org.hibernate.hql.ast.tree
PostPosted: Tue Apr 29, 2014 8:38 pm 
Newbie

Joined: Tue Apr 29, 2014 1:13 pm
Posts: 2
hi, some body from the staff?


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.