|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2008 the original author or authors. |
| 2 | + * Copyright 2002-2009 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -89,7 +89,8 @@ public class AnnotationSessionFactoryBean extends LocalSessionFactoryBean implem
|
89 | 89 | private TypeFilter[] entityTypeFilters = new TypeFilter[] {
|
90 | 90 | new AnnotationTypeFilter(Entity.class, false),
|
91 | 91 | new AnnotationTypeFilter(Embeddable.class, false),
|
92 |
| - new AnnotationTypeFilter(MappedSuperclass.class, false)}; |
| 92 | + new AnnotationTypeFilter(MappedSuperclass.class, false), |
| 93 | + new AnnotationTypeFilter(org.hibernate.annotations.Entity.class, false)}; |
93 | 94 |
|
94 | 95 | private ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver();
|
95 | 96 |
|
@@ -141,7 +142,8 @@ public void setPackagesToScan(String[] packagesToScan) {
|
141 | 142 | * Specify custom type filters for Spring-based scanning for entity classes.
|
142 | 143 | * <p>Default is to search all specified packages for classes annotated with
|
143 | 144 | * <code>@javax.persistence.Entity</code>, <code>@javax.persistence.Embeddable</code>
|
144 |
| - * or <code>@javax.persistence.MappedSuperclass</code>. |
| 145 | + * or <code>@javax.persistence.MappedSuperclass</code>, as well as for |
| 146 | + * Hibernate's special <code>@org.hibernate.annotations.Entity</code>. |
145 | 147 | * @see #setPackagesToScan
|
146 | 148 | */
|
147 | 149 | public void setEntityTypeFilters(TypeFilter[] entityTypeFilters) {
|
|
0 commit comments