Skip to content

Commit 093fa60

Browse files
committed
Polishing.
See #4061 Original pull request: #4062.
1 parent ac538c6 commit 093fa60

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/EntityOperations.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,12 @@ public String determineCollectionName(@Nullable Class<?> entityClass) {
175175
}
176176

177177
MongoPersistentEntity<?> persistentEntity = context.getPersistentEntity(entityClass);
178-
if(persistentEntity == null) {
179-
throw new MappingException(String.format("Collection name cannot be derived for type %s. Is it a store native type?", entityClass));
178+
179+
if (persistentEntity == null) {
180+
throw new MappingException(String.format(
181+
"Cannot determine collection name from type '%s'. Is it a store native type?", entityClass.getName()));
180182
}
183+
181184
return persistentEntity.getCollection();
182185
}
183186

0 commit comments

Comments
 (0)