-->
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: Searching in embedded Collections
PostPosted: Fri Jul 04, 2014 6:01 am 
Newbie

Joined: Wed Apr 02, 2014 8:04 am
Posts: 6
Hi!

I don't get it working....
Following example:

I have a class 'Movie', which holds a list of 'Actors'.
An Actor has a 'name' and a 'role'

When I search for movies with actor.name = 'Cruise' and actor.role = 'Mainactor', i will receive a list with all movies, which contain actors with name = 'Cruise' and which have some other actor (no matter, which name!!! thats the Problem!) with a role = 'Mainactor'. So i will e.g. get movies with actor.name = 'Hanks' and actor.role='Mainactor'
What i want is a list with movies, where an actor with name = 'Cruise' exists and where this actor has the role 'Mainactor'
So I want to achieve some kind of 'join' between movies and actors with an 'where'-clause, as it would be in sql...

I tried an 'inner' BooleanQuery where i added the 'actor'-field and which i added to the 'MainQueue', but this doesn't have any effect....

How does this work? I don't get it....


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.