Skip to content

Commit

Permalink
Polishing.
Browse files Browse the repository at this point in the history
See #4061
Original pull request: #4062.
  • Loading branch information
mp911de committed Sep 16, 2022
1 parent bc575de commit 4032013
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -175,9 +175,12 @@ public String determineCollectionName(@Nullable Class<?> entityClass) {
}

MongoPersistentEntity<?> persistentEntity = context.getPersistentEntity(entityClass);
if(persistentEntity == null) {
throw new MappingException(String.format("Collection name cannot be derived for type %s. Is it a store native type?", entityClass));

if (persistentEntity == null) {
throw new MappingException(String.format(
"Cannot determine collection name from type '%s'. Is it a store native type?", entityClass.getName()));
}

return persistentEntity.getCollection();
}

Expand Down

0 comments on commit 4032013

Please sign in to comment.