Skip to content

Commit addeead

Browse files
committed
Remove @Persistent from entity-scan include filters.
We now only scan for entities annotated with `@Table` and `@PrimaryKeyClass` to avoid inclusion of non-Cassandra entities. Previously, types annotated (or meta-annotated) with `@Persistent` were included as Cassandra entity which could lead to mapping rule violations. Closes #1100
1 parent c174258 commit addeead

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

spring-data-cassandra/src/main/java/org/springframework/data/cassandra/config/CassandraEntityClassScanner.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,10 @@ protected Set<Class<?>> scanBasePackageForEntities(String basePackage) throws Cl
232232
/**
233233
* @return entity annotations.
234234
* @see Table
235-
* @see Persistent
236235
* @see PrimaryKeyClass
237236
*/
238237
@SuppressWarnings("unchecked")
239238
protected Class<? extends Annotation>[] getEntityAnnotations() {
240-
return new Class[] { Table.class, Persistent.class, PrimaryKeyClass.class };
239+
return new Class[] { Table.class, PrimaryKeyClass.class };
241240
}
242241
}

0 commit comments

Comments
 (0)