-->
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: Hibernate Search, Criteria and entity mismatch
PostPosted: Fri Feb 26, 2010 7:10 am 
Newbie

Joined: Fri Feb 26, 2010 7:02 am
Posts: 2
Hi,
I have an abstract AbstractDocument class and indexed Letter class which is a subclass of AbstractDocument. When I run a fulltextquery with criteria in order to filter some letters out based on some AbstractDocument property (therefore criteria target entity is AbstractDocument) search comes up with "SearchException: Criteria query entity should match query entity".

I know I could target the criteria at Letter, but I want it to be targeted at AbstractDocument in order to be able to search over other documents too (I indexed Letter to test out but later other types would also be indexed).

Now, I am not sure weather it is a bug of Hibernate (all in all AbstractDocument is part of Letter) or I am doing something wrong.

Thanks in advance.


Top
 Profile  
 
 Post subject: Re: Hibernate Search, Criteria and entity mismatch
PostPosted: Fri Feb 26, 2010 8:08 am 
Newbie

Joined: Fri Feb 26, 2010 7:02 am
Posts: 2
Now that I have more enities indexed the problem is "Cannot mix criteria and multiple entity types". Is there no way to filter search that looks into multiple entities (with the same superclass) with Criterias ?


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.