From 4aa083377b88459a5636ca39f47daa5c88bee4d9 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 26 Jun 2017 14:27:18 +0200 Subject: [PATCH] =?UTF-8?q?DATACMNS-1101=20-=20Iterate=20with=20BasicPersi?= =?UTF-8?q?stentEntity.doWithProperties(=E2=80=A6)=20over=20precomputed=20?= =?UTF-8?q?properties.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/mapping/model/BasicPersistentEntity.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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); + } + } } /*