-->
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: hibernate execption
PostPosted: Fri Oct 22, 2010 4:07 am 
Newbie

Joined: Fri Oct 22, 2010 3:51 am
Posts: 1
org.hibernate.hql.ast.QuerySyntaxException: cannot dereference scalar collection element: cspName

Code:
st.append("SELECT customers.name,sum(csp.cspValue) as TotalMoney ");
            st.append("from ACCOUNT as account ");
            st.append("left join account.CSPFields as csp with ((account.accountID=csp.id) and  (csp.cspName = 'Target')) ");
            st.append("left join Customers as customers");
            st.append("with account.customerExec.id=customers.id ");
st.append("where (account.accountDate between :startDate and :endDate) ");
            st.append("and (account.accountBatch.id in (:acIDs)) ");
            st.append("group by customers.name");


CSPFields is object of map in Account class. cspName is key in map collection.

please suggest.


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.