DATACMNS-1208 - AbstractMappingContext.hasPersistentEntityFor(…) now properly considers cached absence.
AbstractMappingContext.hasPersistentEntityFor(…) now also properly consideres the empty Optional as non-presence as that is held to allow to distinguish between a type completely unkown to the context, or already known but not considered a persistent entity. Related pull request: #258.
This commit is contained in:
@@ -181,7 +181,9 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
|
||||
|
||||
Assert.notNull(type, "Type must not be null!");
|
||||
|
||||
return persistentEntities.containsKey(ClassTypeInformation.from(type));
|
||||
Optional<E> entity = persistentEntities.get(ClassTypeInformation.from(type));
|
||||
|
||||
return entity == null ? false : entity.isPresent();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user