Skip to content

Commit

Permalink
Remove @Persistent from entity-scan include filters.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mp911de committed Mar 11, 2021
1 parent 82739fa commit 695df45
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -232,11 +232,10 @@ protected Set<Class<?>> scanBasePackageForEntities(String basePackage) throws Cl
/**
* @return entity annotations.
* @see Table
* @see Persistent
* @see PrimaryKeyClass
*/
@SuppressWarnings("unchecked")
protected Class<? extends Annotation>[] getEntityAnnotations() {
return new Class[] { Table.class, Persistent.class, PrimaryKeyClass.class };
return new Class[] { Table.class, PrimaryKeyClass.class };
}
}

0 comments on commit 695df45

Please sign in to comment.