Browse Source

Polishing.

See #4061
Original pull request: #4062.
3.4.x
Mark Paluch 3 years ago
parent
commit
093fa602a8
No known key found for this signature in database
GPG Key ID: 4406B84C1661DCD1
  1. 5
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/EntityOperations.java

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

@ -175,9 +175,12 @@ class EntityOperations {
} }
MongoPersistentEntity<?> persistentEntity = context.getPersistentEntity(entityClass); MongoPersistentEntity<?> persistentEntity = context.getPersistentEntity(entityClass);
if (persistentEntity == null) { if (persistentEntity == null) {
throw new MappingException(String.format("Collection name cannot be derived for type %s. Is it a store native type?", entityClass)); throw new MappingException(String.format(
"Cannot determine collection name from type '%s'. Is it a store native type?", entityClass.getName()));
} }
return persistentEntity.getCollection(); return persistentEntity.getCollection();
} }

Loading…
Cancel
Save