File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -981,11 +981,12 @@ private Query getIdQueryFor(Object object) {
981
981
982
982
Assert .notNull (object );
983
983
984
- MongoPersistentEntity <?> entity = mappingContext .getPersistentEntity (object .getClass ());
984
+ Class <?> objectType = object .getClass ();
985
+ MongoPersistentEntity <?> entity = mappingContext .getPersistentEntity (objectType );
985
986
MongoPersistentProperty idProp = entity == null ? null : entity .getIdProperty ();
986
987
987
988
if (idProp == null ) {
988
- throw new MappingException ("No id property found for object of type " + entity . getType (). getName () );
989
+ throw new MappingException ("No id property found for object of type " + objectType );
989
990
}
990
991
991
992
ConversionService service = mongoConverter .getConversionService ();
You can’t perform that action at this time.
0 commit comments