Skip to content

Commit

Permalink
polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
schauder committed Nov 6, 2024
1 parent 334f58f commit 08c1900
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -722,13 +722,10 @@ public Object writeValue(@Nullable Object value, TypeInformation<?> type) {

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

RelationalPersistentEntity<?> persistentEntity = getMappingContext().getPersistentEntity(value.getClass());

if (persistentEntity != null) {
RelationalPersistentEntity<?> persistentEntity = getMappingContext().getRequiredPersistentEntity(value.getClass());

Object id = persistentEntity.getIdentifierAccessor(value).getIdentifier();
return writeValue(id, type);
}
}

return getConversionService().convert(value, type.getType());
Expand Down

0 comments on commit 08c1900

Please sign in to comment.