diff --git a/src/main/java/org/springframework/data/mapping/model/BasicPersistentEntity.java b/src/main/java/org/springframework/data/mapping/model/BasicPersistentEntity.java index e7cc4bc45..c349e81db 100644 --- a/src/main/java/org/springframework/data/mapping/model/BasicPersistentEntity.java +++ b/src/main/java/org/springframework/data/mapping/model/BasicPersistentEntity.java @@ -324,7 +324,11 @@ public class BasicPersistentEntity> implement Assert.notNull(handler, "PropertyHandler must not be null!"); - getPersistentProperties().forEach(handler::doWithPersistentProperty); + for (P property : properties) { + if (!property.isTransient() && !property.isAssociation()) { + handler.doWithPersistentProperty(property); + } + } } /* @@ -336,7 +340,11 @@ public class BasicPersistentEntity> implement Assert.notNull(handler, "Handler must not be null!"); - getPersistentProperties().forEach(handler::doWithPersistentProperty); + for (PersistentProperty property : properties) { + if (!property.isTransient() && !property.isAssociation()) { + handler.doWithPersistentProperty(property); + } + } } /*