Skip to content

Commit 08c1900

Browse files
committed
polishing
1 parent 334f58f commit 08c1900

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/MappingRelationalConverter.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -722,13 +722,10 @@ public Object writeValue(@Nullable Object value, TypeInformation<?> type) {
722722

723723
if (getMappingContext().hasPersistentEntityFor(value.getClass())) {
724724

725-
RelationalPersistentEntity<?> persistentEntity = getMappingContext().getPersistentEntity(value.getClass());
726-
727-
if (persistentEntity != null) {
725+
RelationalPersistentEntity<?> persistentEntity = getMappingContext().getRequiredPersistentEntity(value.getClass());
728726

729727
Object id = persistentEntity.getIdentifierAccessor(value).getIdentifier();
730728
return writeValue(id, type);
731-
}
732729
}
733730

734731
return getConversionService().convert(value, type.getType());

0 commit comments

Comments
 (0)