diff --git a/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/annotation/AnnotationSessionFactoryBean.java b/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/annotation/AnnotationSessionFactoryBean.java index 6bbccf5e53..d9a06ccf22 100644 --- a/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/annotation/AnnotationSessionFactoryBean.java +++ b/org.springframework.orm/src/main/java/org/springframework/orm/hibernate3/annotation/AnnotationSessionFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2009 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -89,7 +89,8 @@ public class AnnotationSessionFactoryBean extends LocalSessionFactoryBean implem private TypeFilter[] entityTypeFilters = new TypeFilter[] { new AnnotationTypeFilter(Entity.class, false), new AnnotationTypeFilter(Embeddable.class, false), - new AnnotationTypeFilter(MappedSuperclass.class, false)}; + new AnnotationTypeFilter(MappedSuperclass.class, false), + new AnnotationTypeFilter(org.hibernate.annotations.Entity.class, false)}; private ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver(); @@ -141,7 +142,8 @@ public class AnnotationSessionFactoryBean extends LocalSessionFactoryBean implem * Specify custom type filters for Spring-based scanning for entity classes. *

Default is to search all specified packages for classes annotated with * @javax.persistence.Entity, @javax.persistence.Embeddable - * or @javax.persistence.MappedSuperclass. + * or @javax.persistence.MappedSuperclass, as well as for + * Hibernate's special @org.hibernate.annotations.Entity. * @see #setPackagesToScan */ public void setEntityTypeFilters(TypeFilter[] entityTypeFilters) {