diff --git a/src/main/java/org/springframework/data/mapping/model/AbstractPersistentProperty.java b/src/main/java/org/springframework/data/mapping/model/AbstractPersistentProperty.java index f1a9588b4..b96943744 100644 --- a/src/main/java/org/springframework/data/mapping/model/AbstractPersistentProperty.java +++ b/src/main/java/org/springframework/data/mapping/model/AbstractPersistentProperty.java @@ -50,10 +50,10 @@ public abstract class AbstractPersistentProperty
CAUSE_FIELD = ReflectionUtils.findField(Throwable.class, "cause");
}
- protected final String name;
- protected final TypeInformation> information;
- protected final Class> rawType;
- protected final Optional
this.information = PropertyPath.from(Pattern.quote(property.getName()), owner.getTypeInformation())
.getTypeInformation();
this.property = property;
- this.association = isAssociation() ? Optional.of(createAssociation()) : Optional.empty();
+ this.association = Lazy.of(() -> isAssociation() ? Optional.of(createAssociation()) : Optional.empty());
this.owner = owner;
this.hashCode = Lazy.of(property::hashCode);
@@ -206,7 +206,7 @@ public abstract class AbstractPersistentProperty
*/
@Override
public Optional value;
private final Map findPropertyOrOwnerAnnotation(AccessType.class)//
- .map(it -> Type.PROPERTY.equals(it.value()))//
- .orElse(super.usePropertyAccess()));
- this.isTransient = Lazy.of(() -> super.isTransient() || isAnnotationPresent(Transient.class)
- || isAnnotationPresent(Value.class) || isAnnotationPresent(Autowired.class));
}
/**