<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><br><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>From: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Zhendong Chen <<a href="mailto:chenzd@pds.de">chenzd@pds.de</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Date:<span class="Apple-converted-space"> </span></b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"> April 6, 2009 08:31:12<span class="Apple-converted-space"> </span>CEDT</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>To: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><a href="mailto:emmanuel@hibernate.org">emmanuel@hibernate.org</a></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Subject: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><b>Hibernate Search 3.1.0GA Bugs after HSEARCH-160</b></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Reply-To: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><a href="mailto:chenzd@pds.de">chenzd@pds.de</a></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div> </div> <div bgcolor="#ffffff" text="#000000"> <span class="postbody"><span style="font-weight: bold;">Hibernate version: 3.3.1GA</span> <br> <span style="font-weight: bold;">Hibernate Search 3.1.0GA</span> <br> <span style="font-weight: bold;">Lucene 2.4.0</span> <br> <br> Hallo, <br> <br> we have a abstract class a with annotation like this <br> <br> @Inheritance(strategy = InheritanceType.SINGLE_TABLE) <br> @Indexed <br> <br> this class is annotate as a single_table, we got this exception: <br> Cannot mix criteria and multiple entity types <br> <br> and this change was happend after HSEARCH-160. <br> We have make a quick fix for this, it's not nice, maybe you can fix it in the next version <br> </span> <br> public class SearchFactoryImpl implements SearchFactoryImplementor { <br> ... <br> private void initDocumentBuilders(SearchConfiguration cfg, ReflectionManager reflectionManager) { <br> ... <br> //if ( mappedXClass.isAbstract() ) { <br> // log.warn( "Abstract classes can never insert index documents. Remove @Indexed." ); <br> // continue; <br> //} <br> ... <br> } <br> <br> ... <br> <br> Set<Class<?>> getIndexedClasses(Class<?>[] classes) { <br> Set<Class<?>> idexedClasses = new HashSet<Class<?>>(); <br> for ( Class clazz : classes ) { <br> <br> Inheritance inheritance = (Inheritance) clazz.getAnnotation(Inheritance.class); <br> if(inheritance!=null && inheritance.strategy().equals(InheritanceType.SINGLE_TABLE)) <br> { <br> idexedClasses.add(clazz); <br> } <br> else <br> { <br> Set<Class<?>> set = classToIndexedClass.get( clazz ); <br> if ( set != null ) { <br> // at this point we don't have to care about including indexed subclasses of a indexed class <br> // MultiClassesQueryLoader will take care of this later and optimise the queries <br> idexedClasses.addAll( set ); <br> } <br> } <br> } <br> if ( log.isTraceEnabled() ) { <br> log.trace( "Targeted indexed classes for {}: {}", Arrays.toString( classes ), idexedClasses ); <br> } <br> return idexedClasses; <br> } <br> ... <br> } <pre class="moz-signature" cols="72">--
Zhendong Chen
-----------------------------------------------------------------------------------------------------------------
PDS Programm + Datenservice GmbH
Mühlenstrasse 22 - 27356 Rotenburg (Wümme)
Telefon: (04261) 855-01, Fax: (04261) 855-335
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:zhendong.chen@pds.de">zhendong.chen@pds.de</a>, Homepage: <a class="moz-txt-link-abbreviated" href="http://www.pds.de">www.pds.de</a>
Geschäftsleitung: Hinrich Hamelberg, Stephan Mau, Handelsregister Walsrode HRB 70186,
Steuer-Nr.: 40/202/02809, USt-IdNr.: DE 116324331</pre> </div> </blockquote></div><br></body></html>