-->
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: problem using maps in hql
PostPosted: Fri Nov 28, 2008 4:20 am 
Newbie

Joined: Wed Nov 12, 2008 5:31 am
Posts: 7
Hibernate version: 3.2.5

Hi folks,
i am trying to access the elements of a map in a HQL query and get org.hibernate.QueryException: illegal attempt to dereference collection executing my query.
Here is my query:
Code:
from MasterData as md where md.parametersIntern.name = 'John'

In this case parmetersIntern is a map of elements. I am trying to access the field name of the map objects in my where condition.

I have also tried following query:
Code:
from MasterData as md where md.parametersIntern[key].name = 'John'

In this case i am getting SQLGrammarException.

What is wrong with these queries? Has anybody an idea? How should my query looks like?
Many thanks in advance.


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.