Skip to content

Commit 26554e3

Browse files
committed
Polishing.
See #4061 Original pull request: #4062.
1 parent 018fe62 commit 26554e3

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
@@ -139,9 +139,12 @@ public String determineCollectionName(@Nullable Class<?> entityClass) {
139139
}
140140

141141
MongoPersistentEntity<?> persistentEntity = context.getPersistentEntity(entityClass);
142-
if(persistentEntity == null) {
143-
throw new MappingException(String.format("Collection name cannot be derived for type %s. Is it a store native type?", entityClass));
142+
143+
if (persistentEntity == null) {
144+
throw new MappingException(String.format(
145+
"Cannot determine collection name from type '%s'. Is it a store native type?", entityClass.getName()));
144146
}
147+
145148
return persistentEntity.getCollection();
146149
}
147150

0 commit comments

Comments
 (0)