diff --git a/src/main/java/org/springframework/data/jdbc/repository/support/JdbcRepositoryFactory.java b/src/main/java/org/springframework/data/jdbc/repository/support/JdbcRepositoryFactory.java index 69b4b9e8a..db5d196d5 100644 --- a/src/main/java/org/springframework/data/jdbc/repository/support/JdbcRepositoryFactory.java +++ b/src/main/java/org/springframework/data/jdbc/repository/support/JdbcRepositoryFactory.java @@ -92,11 +92,7 @@ public class JdbcRepositoryFactory extends RepositoryFactorySupport { @Override public EntityInformation getEntityInformation(Class aClass) { - RelationalPersistentEntity entity = context.getPersistentEntity(aClass); - - if (entity == null) { - return null; - } + RelationalPersistentEntity entity = context.getRequiredPersistentEntity(aClass); return (EntityInformation) new PersistentEntityInformation<>(entity); }