[hibernate-dev] [Search] Why is global @AnalyzerDefs scanning limited to @Entity?

Emmanuel Bernard emmanuel at hibernate.org
Wed Aug 21 10:52:42 EDT 2013


To me the real answer is to the programmatic API and add a
programmatic mapping factory to your configuration.

See Example 4.28. Use a mapping factory in
http://docs.jboss.org/hibernate/search/4.4/reference/en-US/html_single/#hsearch-mapping-programmaticapi

On Thu 2013-06-20 18:22, Guillaume Smet wrote:
> Hi,
> 
> We would like to declare our global @AnalyzerDefs on a class which
> isn't a specific entity.
> 
> For the @TypeDefs of Hibernate, we do it by declaring the @TypeDefs on
> a class annotated with @MappedSuperClass but with @AnalyzerDefs, we
> are forced to declare them on a concrete @Entity.
> 
> Is this an oversight or something due to the way the initialization of
> Hibernate Search is done and we cannot change?
> 
> I know it's only cosmetic but it's a bit ugly to have a dummy entity
> and a dummy table in our core framework just to be able to declare
> global @AnalyzerDefs.
> 
> Thanks for your feedback.
> 
> -- 
> Guillaume
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev


More information about the hibernate-dev mailing list